taon-storage 18.0.29 → 18.0.31
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/assets/shared/shared_folder_info.txt +1 -1
- package/index.js +15 -2
- package/index.js.map +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/constants.js +3 -3
- package/lib/constants.js.map +1 -1
- package/lib/file-stor.js +52 -82
- package/lib/file-stor.js.map +1 -1
- package/lib/helpers.js +4 -4
- package/lib/helpers.js.map +1 -1
- package/lib/index._auto-generated_.d.ts +1 -0
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/index.js +15 -2
- package/lib/index.js.map +1 -1
- package/lib/models.js.map +1 -1
- package/lib/storage.js +176 -231
- package/lib/storage.js.map +1 -1
- package/migrations/index.js +15 -2
- package/migrations/index.js.map +1 -1
- package/migrations/migrations_index._auto-generated_.d.ts +1 -0
- package/migrations/migrations_index._auto-generated_.js.map +1 -1
- package/package.json +7 -38
- package/src.d.ts +1 -1
- package/tmp-environment.json +8 -365
- package/browser/package.json +0 -25
- package/taon.jsonc +0 -30
- package/websql/package.json +0 -25
package/lib/storage.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Stor = void 0;
|
|
4
4
|
exports.uncache = uncache;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var file_stor_1 = require("./file-stor");
|
|
5
|
+
const helpers_1 = require("./helpers");
|
|
6
|
+
const file_stor_1 = require("./file-stor");
|
|
8
7
|
/* */
|
|
9
8
|
/* */
|
|
10
9
|
//#endregion
|
|
11
10
|
//#region constants
|
|
12
|
-
|
|
11
|
+
const AWAITING_INTERVAL_TIME = 200;
|
|
13
12
|
//#endregion
|
|
14
13
|
//#region public api / uncahce
|
|
15
14
|
function uncache(onlyInThisComponentClass, propertyValueToDeleteFromCache) {
|
|
@@ -25,223 +24,84 @@ function uncache(onlyInThisComponentClass, propertyValueToDeleteFromCache) {
|
|
|
25
24
|
]);
|
|
26
25
|
}
|
|
27
26
|
//#endregion
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
//#region private methods / action
|
|
33
|
-
this.action = function (defaultValue, storageEngine
|
|
34
|
-
/* */
|
|
35
|
-
/* */
|
|
36
|
-
, engine, transformFrom, transformTo) {
|
|
37
|
-
if (!_this.onlyInThisComponentClass) { // @ts-ignore
|
|
38
|
-
_this.onlyInThisComponentClass = { name: '__GLOBAL_NAMESPACE__' };
|
|
39
|
-
}
|
|
40
|
-
return function (target, memberName) {
|
|
41
|
-
var currentValue = target[memberName];
|
|
42
|
-
var setItemDefaultValue = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
43
|
-
var observe;
|
|
44
|
-
var _this = this;
|
|
45
|
-
return tslib_1.__generator(this, function (_a) {
|
|
46
|
-
switch (_a.label) {
|
|
47
|
-
case 0:
|
|
48
|
-
observe = {
|
|
49
|
-
engine: engine,
|
|
50
|
-
id: 'setting default value'
|
|
51
|
-
};
|
|
52
|
-
TaonStorage.pendingOperatins.push(observe);
|
|
53
|
-
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
54
|
-
storageEngine.getItem((0, helpers_1.keyValue)(_this.onlyInThisComponentClass, memberName), function (err, valFromDb) {
|
|
55
|
-
// target[memberName] = valFromDb;
|
|
56
|
-
currentValue = transformFrom ? transformFrom(valFromDb) : valFromDb;
|
|
57
|
-
// log.info(`["${memberName}"] set default value for `, valFromDb);
|
|
58
|
-
resolve();
|
|
59
|
-
_this.endObserverAction(observe);
|
|
60
|
-
});
|
|
61
|
-
})];
|
|
62
|
-
case 1:
|
|
63
|
-
_a.sent();
|
|
64
|
-
return [2 /*return*/];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}); };
|
|
68
|
-
if (defaultValue !== void 0) {
|
|
69
|
-
//#region setting default value from db
|
|
70
|
-
var observe_1 = {
|
|
71
|
-
engine: engine,
|
|
72
|
-
id: 'setting not rivial default value'
|
|
73
|
-
};
|
|
74
|
-
TaonStorage.pendingOperatins.push(observe_1);
|
|
75
|
-
(new Promise(function (resolve, reject) {
|
|
76
|
-
storageEngine.getItem((0, helpers_1.keyDefaultValueAreadySet)(_this.onlyInThisComponentClass, memberName), function (err, val) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
77
|
-
var _this = this;
|
|
78
|
-
return tslib_1.__generator(this, function (_a) {
|
|
79
|
-
switch (_a.label) {
|
|
80
|
-
case 0:
|
|
81
|
-
if (!val) return [3 /*break*/, 2];
|
|
82
|
-
return [4 /*yield*/, setItemDefaultValue()];
|
|
83
|
-
case 1:
|
|
84
|
-
_a.sent();
|
|
85
|
-
resolve();
|
|
86
|
-
return [3 /*break*/, 5];
|
|
87
|
-
case 2: return [4 /*yield*/, new Promise(function (res, rej) {
|
|
88
|
-
storageEngine.setItem((0, helpers_1.keyDefaultValueAreadySet)(_this.onlyInThisComponentClass, memberName), true, function (err, v) {
|
|
89
|
-
res();
|
|
90
|
-
});
|
|
91
|
-
})];
|
|
92
|
-
case 3:
|
|
93
|
-
_a.sent();
|
|
94
|
-
return [4 /*yield*/, new Promise(function (res, rej) {
|
|
95
|
-
storageEngine.setItem((0, helpers_1.keyValue)(_this.onlyInThisComponentClass, memberName), transformTo ? transformTo(defaultValue) : defaultValue, function (err, val) {
|
|
96
|
-
res();
|
|
97
|
-
});
|
|
98
|
-
})];
|
|
99
|
-
case 4:
|
|
100
|
-
_a.sent();
|
|
101
|
-
currentValue = defaultValue;
|
|
102
|
-
// log.i(`["${memberName}"] defaultValue "${memberName}"`, currentValue)
|
|
103
|
-
resolve();
|
|
104
|
-
_a.label = 5;
|
|
105
|
-
case 5: return [2 /*return*/];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}); });
|
|
109
|
-
})).then(function () {
|
|
110
|
-
_this.endObserverAction(observe_1);
|
|
111
|
-
});
|
|
112
|
-
//#endregion
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
setItemDefaultValue();
|
|
116
|
-
}
|
|
117
|
-
Object.defineProperty(target, memberName, {
|
|
118
|
-
set: function (newValue) {
|
|
119
|
-
//#region setting new value on setter
|
|
120
|
-
var observe = {
|
|
121
|
-
engine: engine,
|
|
122
|
-
id: 'setting in SET not rivial default value'
|
|
123
|
-
};
|
|
124
|
-
TaonStorage.pendingOperatins.push(observe);
|
|
125
|
-
(new Promise(function (resolve, reject) {
|
|
126
|
-
storageEngine.setItem((0, helpers_1.keyValue)(_this.onlyInThisComponentClass, memberName), transformTo ? transformTo(newValue) : newValue, function (err, savedValue) {
|
|
127
|
-
resolve();
|
|
128
|
-
});
|
|
129
|
-
})).then(function () {
|
|
130
|
-
_this.endObserverAction(observe);
|
|
131
|
-
});
|
|
132
|
-
//#endregion
|
|
133
|
-
currentValue = newValue;
|
|
134
|
-
},
|
|
135
|
-
get: function () { return currentValue; },
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
//#endregion
|
|
140
|
-
//#endregion
|
|
141
|
-
}
|
|
27
|
+
class TaonStorage {
|
|
28
|
+
//#region static
|
|
29
|
+
static pendingOperatins = [];
|
|
30
|
+
static id = 0;
|
|
142
31
|
/**
|
|
143
32
|
* TODO This is fine for now, but could be something smarter here
|
|
144
33
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return {
|
|
217
|
-
get indexedb() {
|
|
218
|
-
that.engine = 'indexeddb';
|
|
219
|
-
return that;
|
|
220
|
-
},
|
|
221
|
-
get localstorage() {
|
|
222
|
-
that.engine = 'localstorage';
|
|
223
|
-
return that;
|
|
224
|
-
},
|
|
225
|
-
//#region @backend
|
|
226
|
-
/**
|
|
227
|
-
* may be relative or absolute
|
|
228
|
-
*/
|
|
229
|
-
file: function (filePath) {
|
|
230
|
-
that.engine = 'file';
|
|
231
|
-
that.filePath = filePath;
|
|
232
|
-
return that;
|
|
233
|
-
},
|
|
234
|
-
jsonFile: function (filePath) {
|
|
235
|
-
that.engine = 'json';
|
|
236
|
-
that.filePath = filePath;
|
|
237
|
-
return that;
|
|
238
|
-
},
|
|
239
|
-
//#endregion
|
|
240
|
-
};
|
|
241
|
-
},
|
|
242
|
-
enumerable: false,
|
|
243
|
-
configurable: true
|
|
244
|
-
});
|
|
34
|
+
static async awaitPendingOperatios(id = TaonStorage.id++) {
|
|
35
|
+
// console.log('AWAITING')
|
|
36
|
+
if (id > Number.MAX_SAFE_INTEGER - 2) {
|
|
37
|
+
TaonStorage.id = 0;
|
|
38
|
+
id = TaonStorage.id++;
|
|
39
|
+
}
|
|
40
|
+
const pending = this.pendingOperatins;
|
|
41
|
+
const toDeleteIndex = [];
|
|
42
|
+
for (let index = 0; index < pending.length; index++) {
|
|
43
|
+
const op = pending[index];
|
|
44
|
+
if (!op.isDone) {
|
|
45
|
+
await new Promise(async (resovle, reject) => {
|
|
46
|
+
setTimeout(async () => {
|
|
47
|
+
await this.awaitPendingOperatios(id);
|
|
48
|
+
resovle();
|
|
49
|
+
}, AWAITING_INTERVAL_TIME);
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
toDeleteIndex.push(index);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
for (let index = 0; index < toDeleteIndex.length; index++) {
|
|
58
|
+
const toDelete = toDeleteIndex[index];
|
|
59
|
+
pending.splice(toDelete, 1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
static get property() {
|
|
63
|
+
return new TaonStorage();
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region private fields
|
|
67
|
+
onlyInThisComponentClass;
|
|
68
|
+
defaultValue;
|
|
69
|
+
engine;
|
|
70
|
+
//#region private fields / file path
|
|
71
|
+
//#region @backend
|
|
72
|
+
filePath;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#endregion
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region public getters
|
|
77
|
+
get in() {
|
|
78
|
+
const that = this;
|
|
79
|
+
return {
|
|
80
|
+
get indexedb() {
|
|
81
|
+
that.engine = 'indexeddb';
|
|
82
|
+
return that;
|
|
83
|
+
},
|
|
84
|
+
get localstorage() {
|
|
85
|
+
that.engine = 'localstorage';
|
|
86
|
+
return that;
|
|
87
|
+
},
|
|
88
|
+
//#region @backend
|
|
89
|
+
/**
|
|
90
|
+
* may be relative or absolute
|
|
91
|
+
*/
|
|
92
|
+
file(filePath) {
|
|
93
|
+
that.engine = 'file';
|
|
94
|
+
that.filePath = filePath;
|
|
95
|
+
return that;
|
|
96
|
+
},
|
|
97
|
+
jsonFile(filePath) {
|
|
98
|
+
that.engine = 'json';
|
|
99
|
+
that.filePath = filePath;
|
|
100
|
+
return that;
|
|
101
|
+
},
|
|
102
|
+
//#endregion
|
|
103
|
+
};
|
|
104
|
+
}
|
|
245
105
|
//#endregion
|
|
246
106
|
//#region public methods
|
|
247
107
|
//#region public methods / for
|
|
@@ -252,21 +112,21 @@ var TaonStorage = /** @class */ (function () {
|
|
|
252
112
|
/* */
|
|
253
113
|
//#endregion
|
|
254
114
|
//#region public methods / with default value
|
|
255
|
-
|
|
115
|
+
withDefaultValue(defaultValue) {
|
|
256
116
|
// log.i(`["${}"]`)
|
|
257
117
|
return this.action(defaultValue, this.getEngine(), this.engine);
|
|
258
|
-
}
|
|
118
|
+
}
|
|
259
119
|
//#endregion
|
|
260
120
|
//#region public methods / with options
|
|
261
|
-
|
|
262
|
-
|
|
121
|
+
withOptions(options) {
|
|
122
|
+
const { defaultValue, transformFrom, transformTo } = (options || {});
|
|
263
123
|
return this.action(defaultValue ? defaultValue : this.defaultValue, this.getEngine(), this.engine, transformFrom, transformTo);
|
|
264
|
-
}
|
|
124
|
+
}
|
|
265
125
|
//#endregion
|
|
266
126
|
//#endregion
|
|
267
127
|
//#region private methods
|
|
268
128
|
//#region private methods / get engine
|
|
269
|
-
|
|
129
|
+
getEngine() {
|
|
270
130
|
switch (this.engine) {
|
|
271
131
|
/* */
|
|
272
132
|
/* */
|
|
@@ -280,17 +140,102 @@ var TaonStorage = /** @class */ (function () {
|
|
|
280
140
|
return new file_stor_1.FileStor(this.filePath, true);
|
|
281
141
|
//#endregion
|
|
282
142
|
}
|
|
283
|
-
}
|
|
143
|
+
}
|
|
284
144
|
//#endregion
|
|
285
145
|
//#region private methods / end observer action
|
|
286
|
-
|
|
146
|
+
endObserverAction(observe) {
|
|
287
147
|
// observe.subscribers.forEach(c => typeof c?.awaitId === 'function' && c());
|
|
288
148
|
observe.isDone = true;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region private methods / action
|
|
152
|
+
action = (defaultValue, storageEngine
|
|
153
|
+
/* */
|
|
154
|
+
/* */
|
|
155
|
+
, engine, transformFrom, transformTo) => {
|
|
156
|
+
if (!this.onlyInThisComponentClass) { // @ts-ignore
|
|
157
|
+
this.onlyInThisComponentClass = { name: '__GLOBAL_NAMESPACE__' };
|
|
158
|
+
}
|
|
159
|
+
return (target, memberName) => {
|
|
160
|
+
let currentValue = target[memberName];
|
|
161
|
+
const setItemDefaultValue = async () => {
|
|
162
|
+
//#region settin default value
|
|
163
|
+
const observe = {
|
|
164
|
+
engine,
|
|
165
|
+
id: 'setting default value'
|
|
166
|
+
};
|
|
167
|
+
TaonStorage.pendingOperatins.push(observe);
|
|
168
|
+
await new Promise((resolve, reject) => {
|
|
169
|
+
storageEngine.getItem((0, helpers_1.keyValue)(this.onlyInThisComponentClass, memberName), (err, valFromDb) => {
|
|
170
|
+
// target[memberName] = valFromDb;
|
|
171
|
+
currentValue = transformFrom ? transformFrom(valFromDb) : valFromDb;
|
|
172
|
+
// log.info(`["${memberName}"] set default value for `, valFromDb);
|
|
173
|
+
resolve();
|
|
174
|
+
this.endObserverAction(observe);
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
//#endregion
|
|
178
|
+
};
|
|
179
|
+
if (defaultValue !== void 0) {
|
|
180
|
+
//#region setting default value from db
|
|
181
|
+
const observe = {
|
|
182
|
+
engine,
|
|
183
|
+
id: 'setting not rivial default value'
|
|
184
|
+
};
|
|
185
|
+
TaonStorage.pendingOperatins.push(observe);
|
|
186
|
+
(new Promise((resolve, reject) => {
|
|
187
|
+
storageEngine.getItem((0, helpers_1.keyDefaultValueAreadySet)(this.onlyInThisComponentClass, memberName), async (err, val) => {
|
|
188
|
+
// log.info(`["${memberName}"] was set default value for ? `, val)
|
|
189
|
+
if (val) {
|
|
190
|
+
await setItemDefaultValue();
|
|
191
|
+
resolve();
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
await new Promise((res, rej) => {
|
|
195
|
+
storageEngine.setItem((0, helpers_1.keyDefaultValueAreadySet)(this.onlyInThisComponentClass, memberName), true, (err, v) => {
|
|
196
|
+
res();
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
await new Promise((res, rej) => {
|
|
200
|
+
storageEngine.setItem((0, helpers_1.keyValue)(this.onlyInThisComponentClass, memberName), transformTo ? transformTo(defaultValue) : defaultValue, (err, val) => {
|
|
201
|
+
res();
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
currentValue = defaultValue;
|
|
205
|
+
// log.i(`["${memberName}"] defaultValue "${memberName}"`, currentValue)
|
|
206
|
+
resolve();
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
})).then(() => {
|
|
210
|
+
this.endObserverAction(observe);
|
|
211
|
+
});
|
|
212
|
+
//#endregion
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
setItemDefaultValue();
|
|
216
|
+
}
|
|
217
|
+
Object.defineProperty(target, memberName, {
|
|
218
|
+
set: (newValue) => {
|
|
219
|
+
//#region setting new value on setter
|
|
220
|
+
const observe = {
|
|
221
|
+
engine,
|
|
222
|
+
id: 'setting in SET not rivial default value'
|
|
223
|
+
};
|
|
224
|
+
TaonStorage.pendingOperatins.push(observe);
|
|
225
|
+
(new Promise((resolve, reject) => {
|
|
226
|
+
storageEngine.setItem((0, helpers_1.keyValue)(this.onlyInThisComponentClass, memberName), transformTo ? transformTo(newValue) : newValue, (err, savedValue) => {
|
|
227
|
+
resolve();
|
|
228
|
+
});
|
|
229
|
+
})).then(() => {
|
|
230
|
+
this.endObserverAction(observe);
|
|
231
|
+
});
|
|
232
|
+
//#endregion
|
|
233
|
+
currentValue = newValue;
|
|
234
|
+
},
|
|
235
|
+
get: () => currentValue,
|
|
236
|
+
});
|
|
237
|
+
};
|
|
289
238
|
};
|
|
290
|
-
|
|
291
|
-
TaonStorage.pendingOperatins = [];
|
|
292
|
-
TaonStorage.id = 0;
|
|
293
|
-
return TaonStorage;
|
|
294
|
-
}());
|
|
239
|
+
}
|
|
295
240
|
exports.Stor = TaonStorage;
|
|
296
241
|
//# sourceMappingURL=storage.js.map
|
package/lib/storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAeA,0BAYC
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["/Users/dfilipiak/projects/npm/taon-dev/taon-storage/src/lib/storage.ts"],"names":[],"mappings":";;;AAeA,0BAYC;AAzBD,uCAA+D;AAE/D,2CAAuC;AACvC,KAAK;AACL,KAAK;AAEL,YAAY;AAEZ,mBAAmB;AACnB,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,YAAY;AAEZ,8BAA8B;AAC9B,SAAgB,OAAO,CAAuB,wBAAwC,EAAE,8BAAoD;IAC1I,IAAI,CAAC,wBAAwB,EAAE,CAAC,CAAC,aAAa;QAC5C,wBAAwB,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IAC9D,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC;IACrB,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;KAEF,CAAC,CAAA;AACJ,CAAC;AACD,YAAY;AAEZ,MAAM,WAAW;IAEf,gBAAgB;IACR,MAAM,CAAC,gBAAgB,GAA8B,EAAE,CAAC;IACxD,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAEtB;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,EAAE;QAC7D,0BAA0B;QAC1B,IAAI,EAAE,GAAG,MAAM,CAAC,gBAAgB,GAAG,CAAC,EAAE,CAAC;YACrC,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;YACnB,EAAE,GAAG,WAAW,CAAC,EAAE,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,C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AC,OAAO,CAAC,CAAC;oBAClC,CAAC,CAAC,CAAC;oBACH,YAAY;oBACZ,YAAY,GAAG,QAAQ,CAAC;gBAC1B,CAAC;gBACD,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY;aACxB,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,CAAC;;AAOS,QAAA,IAAI,GAAG,WAAW,CAAC"}
|
package/migrations/index.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
17
|
//@ts-nocheck
|
|
5
|
-
|
|
18
|
+
__exportStar(require("./migrations_index._auto-generated_"), exports);
|
|
6
19
|
//# sourceMappingURL=index.js.map
|
package/migrations/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":[""],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["/Users/dfilipiak/projects/npm/taon-dev/taon-storage/src/migrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,aAAa;AACb,sEAAoD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations_index._auto-generated_.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,yCAAyC;AAEzC,yCAAyC"}
|
|
1
|
+
{"version":3,"file":"migrations_index._auto-generated_.js","sourceRoot":"","sources":["/Users/dfilipiak/projects/npm/taon-dev/taon-storage/src/migrations/migrations_index._auto-generated_.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,yCAAyC;AAEzC,yCAAyC"}
|
package/package.json
CHANGED
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"linkedFolders": [],
|
|
6
|
-
"ignoreDepsPattern": [],
|
|
7
|
-
"includeAsDev": [],
|
|
8
|
-
"includeOnly": [
|
|
9
|
-
"ng2-logger",
|
|
10
|
-
"localforage",
|
|
11
|
-
"immutable"
|
|
12
|
-
],
|
|
13
|
-
"dependencies": {},
|
|
14
|
-
"npmFixes": []
|
|
15
|
-
},
|
|
16
|
-
"sholdGenerateAutogenIndexFile": true,
|
|
17
|
-
"smartContainerBuildTarget": "",
|
|
18
|
-
"linkedRepos": [],
|
|
19
|
-
"libReleaseOptions": {
|
|
20
|
-
"nodts": false,
|
|
21
|
-
"obscure": false,
|
|
22
|
-
"ugly": false,
|
|
23
|
-
"includeNodeModules": false,
|
|
24
|
-
"cliBuildNoDts": false,
|
|
25
|
-
"cliBuildObscure": false,
|
|
26
|
-
"cliBuildIncludeNodeModules": false,
|
|
27
|
-
"cliBuildUglify": false
|
|
28
|
-
},
|
|
29
|
-
"smartContainerTarget": "",
|
|
30
|
-
"type": "isomorphic-lib",
|
|
31
|
-
"version": "v18"
|
|
32
|
-
},
|
|
2
|
+
"name": "taon-storage",
|
|
3
|
+
"version": "18.0.31",
|
|
4
|
+
"author": "Dariusz Filipiak",
|
|
33
5
|
"dependencies": {
|
|
34
|
-
"
|
|
6
|
+
"ng2-logger": "18.0.26",
|
|
35
7
|
"localforage": "1.10.0",
|
|
36
|
-
"
|
|
8
|
+
"immutable": "~4.3.7"
|
|
37
9
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"version": "18.0.29",
|
|
41
|
-
"lastBuildTagHash": "a145e48fd51b345c1cb64e95dd7295264b38b96d",
|
|
42
|
-
"main": "dist/app.electron.js"
|
|
10
|
+
"bin": {},
|
|
11
|
+
"peerDependencies": {}
|
|
43
12
|
}
|
package/src.d.ts
CHANGED