@fgv/ts-json 5.0.1-9 → 5.0.1
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/dist/index.browser.js +24 -0
- package/dist/index.js +27 -0
- package/dist/packlets/context/compositeJsonMap.js +100 -0
- package/dist/packlets/context/contextHelpers.js +187 -0
- package/dist/packlets/context/index.js +25 -0
- package/dist/packlets/context/jsonContext.js +38 -0
- package/dist/packlets/converters/converters.js +99 -0
- package/dist/packlets/converters/index.js +25 -0
- package/dist/packlets/converters/jsonConverter.js +299 -0
- package/dist/packlets/diff/detailedDiff.js +338 -0
- package/dist/packlets/diff/index.js +24 -0
- package/dist/packlets/diff/threeWayDiff.js +258 -0
- package/dist/packlets/diff/utils.js +59 -0
- package/dist/packlets/editor/common.js +2 -0
- package/dist/packlets/editor/index.js +29 -0
- package/dist/packlets/editor/jsonEditor.js +416 -0
- package/dist/packlets/editor/jsonEditorRule.js +50 -0
- package/dist/packlets/editor/jsonEditorState.js +175 -0
- package/dist/packlets/editor/jsonReferenceMap.js +315 -0
- package/dist/packlets/editor/rules/conditional.js +163 -0
- package/dist/packlets/editor/rules/index.js +26 -0
- package/dist/packlets/editor/rules/multivalue.js +137 -0
- package/dist/packlets/editor/rules/references.js +155 -0
- package/dist/packlets/editor/rules/templates.js +121 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.browser.d.ts +2 -0
- package/lib/index.browser.js +40 -0
- package/package.json +21 -6
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020 Erik Fortune
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { isJsonObject, pickJsonObject } from '@fgv/ts-json-base';
|
|
23
|
+
import { captureResult, fail, failWithDetail, succeedWithDetail } from '@fgv/ts-utils';
|
|
24
|
+
import { JsonEditorRuleBase } from '../jsonEditorRule';
|
|
25
|
+
/**
|
|
26
|
+
* The {@link EditorRules.ReferenceJsonEditorRule | Reference JSON editor rule} replaces property
|
|
27
|
+
* keys or values that match some known object with a copy of that referenced object, formatted
|
|
28
|
+
* according to the current context.
|
|
29
|
+
*
|
|
30
|
+
* A property key is matched if it matches any known referenced value.
|
|
31
|
+
* - If the value of the matched key is `'default'`, then the entire object is formatted
|
|
32
|
+
* with the current context, flattened and merged into the current object.
|
|
33
|
+
* - If the value of the matched key is some other string, then the entire
|
|
34
|
+
* object is formatted with the current context, and the child of the resulting
|
|
35
|
+
* object at the specified path is flattened and merged into the current object.
|
|
36
|
+
* - If the value of the matched key is an object, then the entire object is
|
|
37
|
+
* formatted with the current context extended to include any properties of
|
|
38
|
+
* that object, flattened, and merged into the current object.
|
|
39
|
+
* - It is an error if the referenced value is not an object.
|
|
40
|
+
*
|
|
41
|
+
* Any property, array or literal value is matched if it matches any known
|
|
42
|
+
* value reference. The referenced value is replaced by the referenced
|
|
43
|
+
* value, formatted using the current editor context.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export class ReferenceJsonEditorRule extends JsonEditorRuleBase {
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new {@link EditorRules.ReferenceJsonEditorRule | ReferenceJsonEditorRule}.
|
|
49
|
+
* @param options - Optional {@link IJsonEditorOptions | configuration options} for this rule.
|
|
50
|
+
*/
|
|
51
|
+
constructor(options) {
|
|
52
|
+
super();
|
|
53
|
+
this._options = options;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new {@link EditorRules.ReferenceJsonEditorRule | ReferenceJsonEditorRule}.
|
|
57
|
+
* @param options - Optional {@link IJsonEditorOptions | configuration options} for this rule.
|
|
58
|
+
*/
|
|
59
|
+
static create(options) {
|
|
60
|
+
return captureResult(() => new ReferenceJsonEditorRule(options));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Evaluates a property for reference expansion.
|
|
64
|
+
* @param key - The key of the property to be considered.
|
|
65
|
+
* @param value - The `JsonValue` of the property to be considered.
|
|
66
|
+
* @param state - The {@link JsonEditorState | editor state} for the object being edited.
|
|
67
|
+
* @returns If the reference is successful, returns `Success` with a `JsonObject`
|
|
68
|
+
* to be flattened and merged into the current object. Returns `Failure` with detail `'inapplicable'`
|
|
69
|
+
* for non-reference keys or with detail `'error'` if an error occurs.
|
|
70
|
+
*/
|
|
71
|
+
editProperty(key, value, state) {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
/* c8 ignore next 2 */
|
|
74
|
+
const validation = (_a = this._options) === null || _a === void 0 ? void 0 : _a.validation;
|
|
75
|
+
const refs = state.getRefs((_b = this._options) === null || _b === void 0 ? void 0 : _b.context);
|
|
76
|
+
if (refs === null || refs === void 0 ? void 0 : refs.has(key)) {
|
|
77
|
+
// need to apply any rules to the value before we evaluate it
|
|
78
|
+
const cloneResult = state.editor.clone(value, state.context);
|
|
79
|
+
if (cloneResult.isSuccess()) {
|
|
80
|
+
value = cloneResult.value;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
const message = `${key}: ${cloneResult.message}`;
|
|
84
|
+
return state.failValidation('invalidPropertyName', message, validation);
|
|
85
|
+
}
|
|
86
|
+
const contextResult = this._extendContext(state, value);
|
|
87
|
+
if (contextResult.isSuccess()) {
|
|
88
|
+
const objResult = refs.getJsonObject(key, contextResult.value);
|
|
89
|
+
// guarded by the has above so should never happen
|
|
90
|
+
/* c8 ignore else */
|
|
91
|
+
if (objResult.isSuccess()) {
|
|
92
|
+
if (typeof value !== 'string' || value === 'default') {
|
|
93
|
+
return succeedWithDetail(objResult.value, 'edited');
|
|
94
|
+
}
|
|
95
|
+
const pickResult = pickJsonObject(objResult.value, value);
|
|
96
|
+
if (pickResult.isFailure()) {
|
|
97
|
+
const message = `${key}: ${pickResult.message}`;
|
|
98
|
+
return state.failValidation('invalidPropertyName', message, validation);
|
|
99
|
+
}
|
|
100
|
+
return pickResult.withDetail('edited');
|
|
101
|
+
}
|
|
102
|
+
else if (objResult.detail !== 'unknown') {
|
|
103
|
+
const message = `${key}: ${objResult.message}`;
|
|
104
|
+
return state.failValidation('invalidPropertyName', message, validation);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const message = `${key}: ${contextResult.message}`;
|
|
109
|
+
return state.failValidation('invalidPropertyName', message, validation);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return failWithDetail('inapplicable', 'inapplicable');
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Evaluates a property, array or literal value for reference replacement.
|
|
116
|
+
* @param value - The `JsonValue` of the property to be considered.
|
|
117
|
+
* @param state - The {@link JsonEditorState | editor state} for the object being edited.
|
|
118
|
+
*/
|
|
119
|
+
editValue(value, state) {
|
|
120
|
+
var _a, _b, _c;
|
|
121
|
+
/* c8 ignore next */
|
|
122
|
+
const refs = state.getRefs((_a = this._options) === null || _a === void 0 ? void 0 : _a.context);
|
|
123
|
+
if (refs && typeof value === 'string') {
|
|
124
|
+
/* c8 ignore next */
|
|
125
|
+
const context = state.getContext((_b = this._options) === null || _b === void 0 ? void 0 : _b.context);
|
|
126
|
+
const result = refs.getJsonValue(value, context);
|
|
127
|
+
if (result.isSuccess()) {
|
|
128
|
+
return succeedWithDetail(result.value, 'edited');
|
|
129
|
+
}
|
|
130
|
+
else if (result.detail === 'error') {
|
|
131
|
+
return state.failValidation('invalidPropertyValue', result.message, (_c = this._options) === null || _c === void 0 ? void 0 : _c.validation);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return failWithDetail('inapplicable', 'inapplicable');
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Gets the template variables to use given the value of some property whose name matched a
|
|
138
|
+
* resource plus the base template context.
|
|
139
|
+
* @param state - The {@link JsonEditorState | editor state} to be extended.
|
|
140
|
+
* @param supplied - The string or object supplied in the source json.
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
_extendContext(state, supplied) {
|
|
144
|
+
var _a;
|
|
145
|
+
const add = {};
|
|
146
|
+
if (isJsonObject(supplied)) {
|
|
147
|
+
add.vars = Object.entries(supplied);
|
|
148
|
+
}
|
|
149
|
+
else if (typeof supplied !== 'string') {
|
|
150
|
+
return fail(`Invalid template path or context: "${JSON.stringify(supplied)}"`);
|
|
151
|
+
}
|
|
152
|
+
return state.extendContext((_a = this._options) === null || _a === void 0 ? void 0 : _a.context, add);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=references.js.map
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020 Erik Fortune
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { captureResult, failWithDetail, succeedWithDetail } from '@fgv/ts-utils';
|
|
23
|
+
import { JsonEditorRuleBase } from '../jsonEditorRule';
|
|
24
|
+
import Mustache from 'mustache';
|
|
25
|
+
/**
|
|
26
|
+
* The {@link EditorRules.TemplatedJsonEditorRule | Templated JSON editor rule} applies mustache rendering as
|
|
27
|
+
* appropriate to any keys or values in the object being edited.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export class TemplatedJsonEditorRule extends JsonEditorRuleBase {
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new {@link EditorRules.TemplatedJsonEditorRule | TemplatedJsonEditorRule}.
|
|
33
|
+
* @param options - Optional {@link EditorRules.ITemplatedJsonRuleOptions | configuration options}
|
|
34
|
+
* for this rule.
|
|
35
|
+
*/
|
|
36
|
+
constructor(options) {
|
|
37
|
+
super();
|
|
38
|
+
this._options = options;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new {@link EditorRules.TemplatedJsonEditorRule | TemplatedJsonEditorRule}.
|
|
42
|
+
* @param options - Optional {@link EditorRules.ITemplatedJsonRuleOptions | configuration options}
|
|
43
|
+
* for this rule.
|
|
44
|
+
*/
|
|
45
|
+
static create(options) {
|
|
46
|
+
return captureResult(() => new TemplatedJsonEditorRule(options));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Evaluates a property name for template rendering.
|
|
50
|
+
* @param key - The key of the property to be considered.
|
|
51
|
+
* @param value - The `JsonValue` of the property to be considered.
|
|
52
|
+
* @param state - The {@link JsonEditorState | editor state} for the object being edited.
|
|
53
|
+
* @returns `Success` with detail `'edited'` and an `JsonObject` to
|
|
54
|
+
* be flattened and merged if the key contained a template. Returns `Failure` with detail `'error'`
|
|
55
|
+
* if an error occurred or with detail `'inapplicable'` if the property key does not contain
|
|
56
|
+
* a template or if name rendering is disabled.
|
|
57
|
+
*/
|
|
58
|
+
editProperty(key, value, state) {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
/* c8 ignore next 2 */
|
|
61
|
+
const validation = (_a = this._options) === null || _a === void 0 ? void 0 : _a.validation;
|
|
62
|
+
const useNameTemplates = ((_b = this._options) === null || _b === void 0 ? void 0 : _b.useNameTemplates) !== false;
|
|
63
|
+
if (useNameTemplates !== false) {
|
|
64
|
+
const result = this._render(key, state).onSuccess((newKey) => {
|
|
65
|
+
if (newKey.length < 1) {
|
|
66
|
+
return state.failValidation('invalidPropertyName', `Template "${key}" renders empty name.`);
|
|
67
|
+
}
|
|
68
|
+
const rtrn = {};
|
|
69
|
+
rtrn[newKey] = value;
|
|
70
|
+
return succeedWithDetail(rtrn, 'edited');
|
|
71
|
+
});
|
|
72
|
+
if (result.isFailure() && result.detail === 'error') {
|
|
73
|
+
const message = `Cannot render name ${key}: ${result.message}`;
|
|
74
|
+
return state.failValidation('invalidPropertyName', message, validation);
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
return failWithDetail('inapplicable', 'inapplicable');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Evaluates a property, array or literal value for template rendering.
|
|
82
|
+
* @param value - The `JsonValue` to be edited.
|
|
83
|
+
* @param state - The {@link JsonEditorState | editor state} for the object being edited.
|
|
84
|
+
* @returns `Success` with detail `'edited'` if the value contained a template and was edited.
|
|
85
|
+
* Returns `Failure` with `'ignore'` if the rendered value should be ignored, with `'error'` if
|
|
86
|
+
* an error occurs, or with `'inapplicable'` if the value was not a string with a template.
|
|
87
|
+
*/
|
|
88
|
+
editValue(value, state) {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.useValueTemplates) !== false && typeof value === 'string' && value.includes('{{')) {
|
|
91
|
+
const renderResult = this._render(value, state).onSuccess((newValue) => {
|
|
92
|
+
return succeedWithDetail(newValue, 'edited');
|
|
93
|
+
});
|
|
94
|
+
if (renderResult.isFailure() && renderResult.detail === 'error') {
|
|
95
|
+
const message = `Cannot render value: ${renderResult.message}`;
|
|
96
|
+
/* c8 ignore next */
|
|
97
|
+
return state.failValidation('invalidPropertyValue', message, (_b = this._options) === null || _b === void 0 ? void 0 : _b.validation);
|
|
98
|
+
}
|
|
99
|
+
return renderResult;
|
|
100
|
+
}
|
|
101
|
+
return failWithDetail('inapplicable', 'inapplicable');
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Renders a single template string for a supplied {@link JsonEditorState | editor state}.
|
|
105
|
+
* @param template - The mustache template to be rendered.
|
|
106
|
+
* @param state - The {@link JsonEditorState | editor state} used to render the template.
|
|
107
|
+
* @returns `Success` if the template is rendered. Returns `Failure` with detail `'error'` if the
|
|
108
|
+
* template could not be rendered (e.g. due to syntax errors) or with detail `'inapplicable'` if the
|
|
109
|
+
* string is not a template.
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
_render(template, state) {
|
|
113
|
+
var _a;
|
|
114
|
+
const vars = state.getVars((_a = this._options) === null || _a === void 0 ? void 0 : _a.context);
|
|
115
|
+
if (vars && template.includes('{{')) {
|
|
116
|
+
return captureResult(() => Mustache.render(template, vars)).withDetail('error', 'edited');
|
|
117
|
+
}
|
|
118
|
+
return failWithDetail('inapplicable', 'inapplicable');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=templates.js.map
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023 Erik Fortune
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
* furnished to do so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
* copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
35
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
// Browser entry point - re-exports everything from main index
|
|
39
|
+
__exportStar(require("./index"), exports);
|
|
40
|
+
//# sourceMappingURL=index.browser.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-json",
|
|
3
|
-
"version": "5.0.1
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Typescript utilities for working with JSON",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "dist/ts-json.d.ts",
|
|
@@ -41,14 +41,29 @@
|
|
|
41
41
|
"@rushstack/eslint-config": "4.5.3",
|
|
42
42
|
"eslint-plugin-tsdoc": "~0.4.0",
|
|
43
43
|
"@rushstack/heft-jest-plugin": "1.1.3",
|
|
44
|
-
"@
|
|
45
|
-
"@fgv/
|
|
46
|
-
"@fgv/ts-
|
|
44
|
+
"@microsoft/api-extractor": "^7.53.3",
|
|
45
|
+
"@fgv/heft-dual-rig": "0.1.0",
|
|
46
|
+
"@fgv/ts-utils": "5.0.1",
|
|
47
|
+
"@fgv/ts-json-base": "5.0.1",
|
|
48
|
+
"@fgv/ts-utils-jest": "5.0.1"
|
|
47
49
|
},
|
|
48
50
|
"peerDependencies": {
|
|
49
51
|
"mustache": "^4.2.0",
|
|
50
|
-
"@fgv/ts-
|
|
51
|
-
"@fgv/ts-
|
|
52
|
+
"@fgv/ts-utils": "5.0.1",
|
|
53
|
+
"@fgv/ts-json-base": "5.0.1"
|
|
54
|
+
},
|
|
55
|
+
"exports": {
|
|
56
|
+
".": {
|
|
57
|
+
"node": {
|
|
58
|
+
"import": "./lib/index.js",
|
|
59
|
+
"require": "./lib/index.js"
|
|
60
|
+
},
|
|
61
|
+
"default": {
|
|
62
|
+
"import": "./lib/index.browser.js",
|
|
63
|
+
"require": "./lib/index.browser.js"
|
|
64
|
+
},
|
|
65
|
+
"types": "dist/ts-json.d.ts"
|
|
66
|
+
}
|
|
52
67
|
},
|
|
53
68
|
"scripts": {
|
|
54
69
|
"build": "heft build --clean",
|