json10 21.0.21 → 21.0.23
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/browser/package.json +1 -1
- package/browser-prod/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib-prod/{build-info._auto-generated_.ts → build-info._auto-generated_.js} +1 -2
- package/lib-prod/env/{env.angular-node-app.ts → env.angular-node-app.js} +1 -1
- package/lib-prod/env/{env.docs-webapp.ts → env.docs-webapp.js} +1 -1
- package/lib-prod/env/{env.electron-app.ts → env.electron-app.js} +1 -1
- package/lib-prod/env/{env.mobile-app.ts → env.mobile-app.js} +1 -1
- package/lib-prod/env/{env.npm-lib-and-cli-tool.ts → env.npm-lib-and-cli-tool.js} +1 -1
- package/lib-prod/env/{env.vscode-plugin.ts → env.vscode-plugin.js} +1 -1
- package/lib-prod/{index._auto-generated_.ts → index._auto-generated_.js} +1 -1
- package/lib-prod/index.js +55 -0
- package/lib-prod/migrations/index.js +2 -0
- package/lib-prod/migrations/{migrations_index._auto-generated_.ts → migrations_index._auto-generated_.js} +0 -2
- package/lib-prod/package.json +1 -1
- package/package.json +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/package.json +1 -1
- package/lib-prod/index.ts +0 -76
- package/lib-prod/lib-info.md +0 -8
- package/lib-prod/migrations/index.ts +0 -2
- package/lib-prod/migrations/migrations-info.md +0 -6
- /package/lib-prod/env/{index.ts → index.js} +0 -0
package/browser/package.json
CHANGED
|
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
25
25
|
/**
|
|
26
26
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
27
27
|
*/
|
|
28
|
-
exports.CURRENT_PACKAGE_VERSION = '21.0.
|
|
28
|
+
exports.CURRENT_PACKAGE_VERSION = '21.0.23';
|
|
29
29
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
30
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/lib/package.json
CHANGED
|
@@ -22,6 +22,5 @@ export const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
22
22
|
/**
|
|
23
23
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
24
24
|
*/
|
|
25
|
-
export const CURRENT_PACKAGE_VERSION = '21.0.
|
|
25
|
+
export const CURRENT_PACKAGE_VERSION = '21.0.23';
|
|
26
26
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
27
|
-
|
|
@@ -63,4 +63,4 @@ export const ENV_ANGULAR_NODE_APP_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_ANGULAR_NODE_APP_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_ANGULAR_NODE_APP_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_ANGULAR_NODE_APP_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -63,4 +63,4 @@ export const ENV_DOCS_WEBAPP_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_DOCS_WEBAPP_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_DOCS_WEBAPP_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_DOCS_WEBAPP_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -63,4 +63,4 @@ export const ENV_ELECTRON_APP_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_ELECTRON_APP_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_ELECTRON_APP_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_ELECTRON_APP_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -63,4 +63,4 @@ export const ENV_MOBILE_APP_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_MOBILE_APP_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_MOBILE_APP_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_MOBILE_APP_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -63,4 +63,4 @@ export const ENV_NPM_LIB_AND_CLI_TOOL_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -63,4 +63,4 @@ export const ENV_VSCODE_PLUGIN_IS_CI_PROCESS = undefined;
|
|
|
63
63
|
export const ENV_VSCODE_PLUGIN_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
64
|
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
65
|
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ___NS__cloneDeep, ___NS__get, ___NS__isArray, ___NS__isFunction, ___NS__isObject, ___NS__isUndefined, ___NS__merge, ___NS__set } from 'tnp-core/lib-prod';
|
|
2
|
+
import { walk } from 'lodash-walk-object/lib-prod';
|
|
3
|
+
import { CLASS } from 'typescript-class-helpers/lib-prod';
|
|
4
|
+
// import { Log } from 'ng2-logger'
|
|
5
|
+
// const log = Log.create('JSON10')
|
|
6
|
+
// let counter = 0
|
|
7
|
+
export class JSON10 {
|
|
8
|
+
static structureArray(anyJSON, options) {
|
|
9
|
+
let pathes = [];
|
|
10
|
+
const { include, exclude } = options || {};
|
|
11
|
+
walk.Object(anyJSON, (value, lodashPath) => {
|
|
12
|
+
if (!___NS__isUndefined(value)) {
|
|
13
|
+
pathes.push(lodashPath);
|
|
14
|
+
}
|
|
15
|
+
}, { include, exclude, checkCircural: true });
|
|
16
|
+
return pathes;
|
|
17
|
+
}
|
|
18
|
+
static cleaned(json, onCircs, options) {
|
|
19
|
+
// console.log('BETTER SRUGUB', json)
|
|
20
|
+
const result = ___NS__isArray(json) ? [] : {};
|
|
21
|
+
const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
|
|
22
|
+
const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
|
|
23
|
+
const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
|
|
24
|
+
if (___NS__isObject(value) && options.isCircural) {
|
|
25
|
+
___NS__set(result, lodashPath, null);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
___NS__set(result, lodashPath, ___NS__cloneDeep(value));
|
|
29
|
+
}
|
|
30
|
+
}, { include, exclude, breadthWalk, checkCircural: true });
|
|
31
|
+
if (___NS__isFunction(onCircs)) {
|
|
32
|
+
onCircs(circs);
|
|
33
|
+
}
|
|
34
|
+
return ___NS__isFunction(classFN) ? ___NS__merge(new classFN(), result) : result;
|
|
35
|
+
}
|
|
36
|
+
static stringify(anyJSON, replace, spaces, onCircs) {
|
|
37
|
+
const json = this.cleaned(anyJSON, onCircs);
|
|
38
|
+
return JSON.stringify(json, replace, spaces);
|
|
39
|
+
}
|
|
40
|
+
static parse(json, circs = []) {
|
|
41
|
+
let res = JSON.parse(json);
|
|
42
|
+
if (___NS__isArray(circs)) {
|
|
43
|
+
circs.forEach(({ circuralTargetPath, pathToObj }) => {
|
|
44
|
+
if (circuralTargetPath === '') {
|
|
45
|
+
___NS__set(res, pathToObj, res);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
let v = ___NS__get(res, circuralTargetPath);
|
|
49
|
+
___NS__set(res, pathToObj, v);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return res;
|
|
54
|
+
}
|
|
55
|
+
}
|
package/lib-prod/package.json
CHANGED
package/package.json
CHANGED
package/websql/package.json
CHANGED
package/websql-prod/package.json
CHANGED
package/lib-prod/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith } from 'tnp-core/lib-prod';
|
|
2
|
-
import { walk, Models__NS__AdditionalIteratorOptions, Models__NS__Circ, Models__NS__InDBType, Models__NS__InternalValues, Models__NS__StartIteratorOptions, Models__NS__Ver } from 'lodash-walk-object/lib-prod';
|
|
3
|
-
export type Circ = Models__NS__Circ;
|
|
4
|
-
import { CLASS } from 'typescript-class-helpers/lib-prod';
|
|
5
|
-
// import { Log } from 'ng2-logger'
|
|
6
|
-
// const log = Log.create('JSON10')
|
|
7
|
-
|
|
8
|
-
// let counter = 0
|
|
9
|
-
|
|
10
|
-
export class JSON10 {
|
|
11
|
-
|
|
12
|
-
public static structureArray(anyJSON: Object, options?: { include?: string[]; exclude?: string[] }) {
|
|
13
|
-
let pathes = []
|
|
14
|
-
const { include, exclude } = options || {} as any;
|
|
15
|
-
walk.Object(anyJSON, (value, lodashPath) => {
|
|
16
|
-
|
|
17
|
-
if (!___NS__isUndefined(value)) {
|
|
18
|
-
pathes.push(lodashPath)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}, { include, exclude, checkCircural: true })
|
|
22
|
-
return pathes;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
public static cleaned(json, onCircs?: (circs: Circ[]) => any, options?:
|
|
27
|
-
{
|
|
28
|
-
exclude?: string[];
|
|
29
|
-
include?: string[];
|
|
30
|
-
breadthWalk?: boolean;
|
|
31
|
-
}) {
|
|
32
|
-
// console.log('BETTER SRUGUB', json)
|
|
33
|
-
const result = ___NS__isArray(json) ? [] : {}
|
|
34
|
-
const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
|
|
35
|
-
|
|
36
|
-
const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
|
|
37
|
-
|
|
38
|
-
const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
|
|
39
|
-
|
|
40
|
-
if (___NS__isObject(value) && options.isCircural) {
|
|
41
|
-
___NS__set(result, lodashPath, null)
|
|
42
|
-
} else {
|
|
43
|
-
___NS__set(result, lodashPath, ___NS__cloneDeep(value))
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
}, { include, exclude, breadthWalk, checkCircural: true });
|
|
47
|
-
|
|
48
|
-
if (___NS__isFunction(onCircs)) {
|
|
49
|
-
onCircs(circs)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return ___NS__isFunction(classFN) ? ___NS__merge(new (classFN as any)(), result) : result;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public static stringify(anyJSON: Object, replace?: any, spaces?: number, onCircs?: (circs: Circ[]) => any) {
|
|
56
|
-
const json = this.cleaned(anyJSON, onCircs);
|
|
57
|
-
return JSON.stringify(json, replace, spaces);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
public static parse(json: string, circs: Circ[] = []) {
|
|
61
|
-
let res = JSON.parse(json);
|
|
62
|
-
if (___NS__isArray(circs)) {
|
|
63
|
-
circs.forEach(({ circuralTargetPath, pathToObj }) => {
|
|
64
|
-
|
|
65
|
-
if (circuralTargetPath === '') {
|
|
66
|
-
___NS__set(res, pathToObj, res)
|
|
67
|
-
} else {
|
|
68
|
-
let v = ___NS__get(res, circuralTargetPath);
|
|
69
|
-
___NS__set(res, pathToObj, v)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
return res;
|
|
75
|
-
}
|
|
76
|
-
}
|
package/lib-prod/lib-info.md
DELETED
|
File without changes
|