@treasuryspatial/panel-core 0.1.2
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/buildPanelModel.d.ts +28 -0
- package/dist/buildPanelModel.d.ts.map +1 -0
- package/dist/buildPanelModel.js +266 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +27 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { UiSchema } from "@treasuryspatial/plugin-manifest";
|
|
2
|
+
import type { PanelBuildOptions, PanelLayout, TabModel } from "./types";
|
|
3
|
+
type UiSchemaShape = {
|
|
4
|
+
uiVersion?: string;
|
|
5
|
+
tabs?: TabModel[];
|
|
6
|
+
panels?: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
tab?: string;
|
|
10
|
+
order?: number;
|
|
11
|
+
description?: string;
|
|
12
|
+
fields?: Array<string | Record<string, unknown>>;
|
|
13
|
+
sections?: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
fields: Array<string | Record<string, unknown>>;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
layout?: {
|
|
21
|
+
defaultPanelId?: string;
|
|
22
|
+
panelOrder?: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
declare const normalizeUiSchema: (ui?: UiSchema) => UiSchemaShape | null;
|
|
26
|
+
export declare function buildPanelModel(options: PanelBuildOptions): PanelLayout;
|
|
27
|
+
export { normalizeUiSchema };
|
|
28
|
+
//# sourceMappingURL=buildPanelModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildPanelModel.d.ts","sourceRoot":"","sources":["../src/buildPanelModel.ts"],"names":[],"mappings":"AAAA,OA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
|
4
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
5
|
+
return null;
|
|
6
|
+
return value;
|
|
7
|
+
};
|
|
8
|
+
const parsePathSegments = (path) => {
|
|
9
|
+
if (!path)
|
|
10
|
+
return [];
|
|
11
|
+
const segments = [];
|
|
12
|
+
const parts = path.split(".");
|
|
13
|
+
for (const part of parts) {
|
|
14
|
+
if (!part)
|
|
15
|
+
continue;
|
|
16
|
+
const matches = part.matchAll(/([^[\]]+)|\[(\d+)\]/g);
|
|
17
|
+
for (const match of matches) {
|
|
18
|
+
if (match[1]) {
|
|
19
|
+
segments.push(match[1]);
|
|
20
|
+
}
|
|
21
|
+
else if (match[2]) {
|
|
22
|
+
segments.push(Number.parseInt(match[2], 10));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return segments;
|
|
27
|
+
};
|
|
28
|
+
const getValueByPath = (source, path) => {
|
|
29
|
+
if (!source)
|
|
30
|
+
return undefined;
|
|
31
|
+
const segments = parsePathSegments(path);
|
|
32
|
+
if (segments.length === 0)
|
|
33
|
+
return undefined;
|
|
34
|
+
let cursor = source;
|
|
35
|
+
for (const segment of segments) {
|
|
36
|
+
if (cursor == null)
|
|
37
|
+
return undefined;
|
|
38
|
+
if (typeof segment === "number") {
|
|
39
|
+
if (!Array.isArray(cursor))
|
|
40
|
+
return undefined;
|
|
41
|
+
cursor = cursor[segment];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
cursor = cursor[segment];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return cursor;
|
|
48
|
+
};
|
|
49
|
+
const resolveDefaultValue = (defaults, key, schemaDefault) => {
|
|
50
|
+
if (defaults) {
|
|
51
|
+
if (Object.prototype.hasOwnProperty.call(defaults, key)) {
|
|
52
|
+
return defaults[key];
|
|
53
|
+
}
|
|
54
|
+
const nested = getValueByPath(defaults, key);
|
|
55
|
+
if (nested !== undefined)
|
|
56
|
+
return nested;
|
|
57
|
+
}
|
|
58
|
+
return schemaDefault;
|
|
59
|
+
};
|
|
60
|
+
const extractDefaultsFromSchemaProps = (schemaProps) => {
|
|
61
|
+
const defaults = {};
|
|
62
|
+
Object.entries(schemaProps).forEach(([key, schema]) => {
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(schema, "default")) {
|
|
64
|
+
defaults[key] = schema.default;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return defaults;
|
|
68
|
+
};
|
|
69
|
+
const normalizeUiSchema = (ui) => {
|
|
70
|
+
const record = asRecord(ui);
|
|
71
|
+
if (!record)
|
|
72
|
+
return null;
|
|
73
|
+
return record;
|
|
74
|
+
};
|
|
75
|
+
const inferControl = (schema, uiField) => {
|
|
76
|
+
const override = uiField?.control;
|
|
77
|
+
if (override)
|
|
78
|
+
return override;
|
|
79
|
+
const schemaType = schema.type;
|
|
80
|
+
if (schema.oneOf)
|
|
81
|
+
return "oneOf";
|
|
82
|
+
if (schemaType === "array")
|
|
83
|
+
return "array";
|
|
84
|
+
if (schemaType === "boolean")
|
|
85
|
+
return "toggle";
|
|
86
|
+
if (schemaType === "string") {
|
|
87
|
+
if (schema.format === "color")
|
|
88
|
+
return "color";
|
|
89
|
+
return "text";
|
|
90
|
+
}
|
|
91
|
+
if (schema.enum)
|
|
92
|
+
return "select";
|
|
93
|
+
if (schemaType === "integer" || schemaType === "number") {
|
|
94
|
+
const hasRange = schema.minimum !== undefined || schema.maximum !== undefined;
|
|
95
|
+
return hasRange ? "range" : "number";
|
|
96
|
+
}
|
|
97
|
+
return "number";
|
|
98
|
+
};
|
|
99
|
+
const toOptions = (schema, uiField) => {
|
|
100
|
+
const options = uiField?.options ??
|
|
101
|
+
(Array.isArray(schema.enum)
|
|
102
|
+
? schema.enum.map((value) => ({ value: value, label: String(value) }))
|
|
103
|
+
: undefined);
|
|
104
|
+
return options;
|
|
105
|
+
};
|
|
106
|
+
function buildFieldModel(key, schema, uiField, defaults) {
|
|
107
|
+
const label = uiField?.label ?? schema.title ?? key;
|
|
108
|
+
const control = inferControl(schema, uiField);
|
|
109
|
+
const base = {
|
|
110
|
+
key,
|
|
111
|
+
label,
|
|
112
|
+
control,
|
|
113
|
+
min: uiField?.min ?? schema.minimum,
|
|
114
|
+
max: uiField?.max ?? schema.maximum,
|
|
115
|
+
step: uiField?.step ?? schema.multipleOf,
|
|
116
|
+
unit: uiField?.unit,
|
|
117
|
+
placeholder: uiField?.placeholder,
|
|
118
|
+
rows: uiField?.rows,
|
|
119
|
+
helpText: uiField?.helpText ?? schema.description,
|
|
120
|
+
options: toOptions(schema, uiField),
|
|
121
|
+
visibleWhen: uiField?.visibleWhen,
|
|
122
|
+
disabledWhen: uiField?.disabledWhen,
|
|
123
|
+
effects: uiField?.effects,
|
|
124
|
+
actionId: uiField?.actionId,
|
|
125
|
+
defaultValue: resolveDefaultValue(defaults, key, schema.default),
|
|
126
|
+
schema,
|
|
127
|
+
};
|
|
128
|
+
if (control === "array") {
|
|
129
|
+
const itemSchema = asRecord(schema.items) ?? {};
|
|
130
|
+
const itemSchemaProps = getSchemaProperties(itemSchema);
|
|
131
|
+
const itemFieldRefs = (uiField?.itemFields ?? uiField?.fields);
|
|
132
|
+
const itemDefaultsFromSchema = extractDefaultsFromSchemaProps(itemSchemaProps);
|
|
133
|
+
const arrayDefault = resolveDefaultValue(defaults, key, schema.default);
|
|
134
|
+
const arrayDefaultItem = Array.isArray(arrayDefault) && arrayDefault.length > 0 && asRecord(arrayDefault[0])
|
|
135
|
+
? arrayDefault[0]
|
|
136
|
+
: undefined;
|
|
137
|
+
const uiItemDefaults = asRecord(uiField?.itemDefaults);
|
|
138
|
+
const itemDefaults = {
|
|
139
|
+
...itemDefaultsFromSchema,
|
|
140
|
+
...(arrayDefaultItem ?? {}),
|
|
141
|
+
...(uiItemDefaults ?? {}),
|
|
142
|
+
};
|
|
143
|
+
const resolvedItemFields = itemFieldRefs ?? Object.keys(itemSchemaProps).sort();
|
|
144
|
+
const itemFields = resolvedItemFields.length
|
|
145
|
+
? buildPanelFields(resolvedItemFields, itemSchemaProps, itemDefaults)
|
|
146
|
+
: [];
|
|
147
|
+
return {
|
|
148
|
+
...base,
|
|
149
|
+
itemFields,
|
|
150
|
+
itemDefaults,
|
|
151
|
+
itemLabel: uiField?.itemLabel,
|
|
152
|
+
minItems: uiField?.minItems ?? schema.minItems,
|
|
153
|
+
maxItems: uiField?.maxItems ?? schema.maxItems,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (control === "oneOf") {
|
|
157
|
+
const oneOfSchemas = Array.isArray(schema.oneOf) ? schema.oneOf : [];
|
|
158
|
+
const uiVariants = uiField?.variants ?? [];
|
|
159
|
+
const variants = uiVariants.length > 0
|
|
160
|
+
? uiVariants.map((variant, index) => {
|
|
161
|
+
const variantSchema = asRecord(oneOfSchemas[index]) ?? {};
|
|
162
|
+
const variantProps = getSchemaProperties(variantSchema);
|
|
163
|
+
const fieldRefs = variant.fields ??
|
|
164
|
+
Object.keys(variantProps).sort();
|
|
165
|
+
const variantDefaults = extractDefaultsFromSchemaProps(variantProps);
|
|
166
|
+
return {
|
|
167
|
+
id: variant.id ?? `option-${index + 1}`,
|
|
168
|
+
label: variant.label ?? variant.id ?? `Option ${index + 1}`,
|
|
169
|
+
fields: buildPanelFields(fieldRefs, variantProps, variantDefaults),
|
|
170
|
+
};
|
|
171
|
+
})
|
|
172
|
+
: oneOfSchemas.map((variantSchema, index) => {
|
|
173
|
+
const variantRecord = asRecord(variantSchema) ?? {};
|
|
174
|
+
const variantProps = getSchemaProperties(variantRecord);
|
|
175
|
+
const fieldRefs = Object.keys(variantProps).sort();
|
|
176
|
+
const variantDefaults = extractDefaultsFromSchemaProps(variantProps);
|
|
177
|
+
const title = variantRecord.title;
|
|
178
|
+
return {
|
|
179
|
+
id: `option-${index + 1}`,
|
|
180
|
+
label: title ?? `Option ${index + 1}`,
|
|
181
|
+
fields: buildPanelFields(fieldRefs, variantProps, variantDefaults),
|
|
182
|
+
};
|
|
183
|
+
});
|
|
184
|
+
const discriminator = uiField?.discriminator ??
|
|
185
|
+
asRecord(schema.discriminator)?.propertyName;
|
|
186
|
+
return {
|
|
187
|
+
...base,
|
|
188
|
+
variants,
|
|
189
|
+
discriminator,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return base;
|
|
193
|
+
}
|
|
194
|
+
;
|
|
195
|
+
const getSchemaProperties = (schema) => {
|
|
196
|
+
const schemaObj = asRecord(schema);
|
|
197
|
+
if (!schemaObj)
|
|
198
|
+
return {};
|
|
199
|
+
const properties = schemaObj.properties;
|
|
200
|
+
if (!properties || typeof properties !== "object" || Array.isArray(properties))
|
|
201
|
+
return {};
|
|
202
|
+
return properties;
|
|
203
|
+
};
|
|
204
|
+
function buildPanelFields(fieldRefs, schemaProps, defaults) {
|
|
205
|
+
return fieldRefs
|
|
206
|
+
.map((fieldRef) => {
|
|
207
|
+
if (typeof fieldRef === "string") {
|
|
208
|
+
const schema = schemaProps[fieldRef] ?? {};
|
|
209
|
+
return buildFieldModel(fieldRef, schema, undefined, defaults);
|
|
210
|
+
}
|
|
211
|
+
const uiField = fieldRef;
|
|
212
|
+
const key = uiField.key;
|
|
213
|
+
if (!key)
|
|
214
|
+
return null;
|
|
215
|
+
const schema = schemaProps[key] ?? {};
|
|
216
|
+
return buildFieldModel(key, schema, uiField, defaults);
|
|
217
|
+
})
|
|
218
|
+
.filter((field) => Boolean(field));
|
|
219
|
+
}
|
|
220
|
+
const buildSections = (sections, schemaProps, defaults) => {
|
|
221
|
+
if (!sections)
|
|
222
|
+
return [];
|
|
223
|
+
return sections.map((section) => ({
|
|
224
|
+
id: section.id,
|
|
225
|
+
title: section.title,
|
|
226
|
+
description: section.description,
|
|
227
|
+
fields: buildPanelFields(section.fields, schemaProps, defaults),
|
|
228
|
+
}));
|
|
229
|
+
};
|
|
230
|
+
const buildPanelsFromUi = (ui, schemaProps, defaults) => {
|
|
231
|
+
if (!ui.panels || ui.panels.length === 0)
|
|
232
|
+
return [];
|
|
233
|
+
return ui.panels.map((panel) => {
|
|
234
|
+
const sections = buildSections(panel.sections, schemaProps, defaults);
|
|
235
|
+
const fields = panel.fields ? buildPanelFields(panel.fields, schemaProps, defaults) : [];
|
|
236
|
+
return {
|
|
237
|
+
id: panel.id,
|
|
238
|
+
title: panel.title,
|
|
239
|
+
tab: panel.tab,
|
|
240
|
+
order: panel.order,
|
|
241
|
+
description: panel.description,
|
|
242
|
+
fields: sections.length > 0 ? undefined : fields,
|
|
243
|
+
sections: sections.length > 0 ? sections : undefined,
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
const buildDefaultPanel = (schemaProps, defaults) => {
|
|
248
|
+
const keys = Object.keys(schemaProps).sort();
|
|
249
|
+
return {
|
|
250
|
+
id: DEFAULT_PANEL_ID,
|
|
251
|
+
title: DEFAULT_PANEL_TITLE,
|
|
252
|
+
fields: keys.map((key) => buildFieldModel(key, schemaProps[key] ?? {}, undefined, defaults)),
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
export function buildPanelModel(options) {
|
|
256
|
+
const schemaProps = getSchemaProperties(options.schema);
|
|
257
|
+
const ui = normalizeUiSchema(options.ui);
|
|
258
|
+
const panels = ui ? buildPanelsFromUi(ui, schemaProps, options.defaults) : [];
|
|
259
|
+
const resolvedPanels = panels.length > 0 ? panels : [buildDefaultPanel(schemaProps, options.defaults)];
|
|
260
|
+
return {
|
|
261
|
+
tabs: ui?.tabs,
|
|
262
|
+
panels: resolvedPanels,
|
|
263
|
+
layout: ui?.layout,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
export { normalizeUiSchema };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { buildPanelModel, normalizeUiSchema } from "./buildPanelModel";
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { JsonSchema, UiSchema } from "@treasuryspatial/plugin-manifest";
|
|
2
|
+
export type PanelBuildOptions = {
|
|
3
|
+
schema: JsonSchema;
|
|
4
|
+
ui?: UiSchema;
|
|
5
|
+
defaults?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export type PanelLayout = {
|
|
8
|
+
tabs?: TabModel[];
|
|
9
|
+
panels: PanelModel[];
|
|
10
|
+
layout?: {
|
|
11
|
+
defaultPanelId?: string;
|
|
12
|
+
panelOrder?: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type TabModel = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
order?: number;
|
|
19
|
+
description?: string;
|
|
20
|
+
};
|
|
21
|
+
export type PanelModel = {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
tab?: string;
|
|
25
|
+
order?: number;
|
|
26
|
+
description?: string;
|
|
27
|
+
fields?: FieldModel[];
|
|
28
|
+
sections?: SectionModel[];
|
|
29
|
+
};
|
|
30
|
+
export type SectionModel = {
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
fields: FieldModel[];
|
|
35
|
+
};
|
|
36
|
+
export type FieldModel = {
|
|
37
|
+
key: string;
|
|
38
|
+
label: string;
|
|
39
|
+
control: FieldControlType;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
step?: number;
|
|
43
|
+
unit?: string;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
rows?: number;
|
|
46
|
+
helpText?: string;
|
|
47
|
+
options?: Array<{
|
|
48
|
+
value: string | number | boolean;
|
|
49
|
+
label: string;
|
|
50
|
+
}>;
|
|
51
|
+
variants?: Array<{
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
fields: FieldModel[];
|
|
55
|
+
}>;
|
|
56
|
+
discriminator?: string;
|
|
57
|
+
itemFields?: FieldModel[];
|
|
58
|
+
itemDefaults?: unknown;
|
|
59
|
+
itemLabel?: string;
|
|
60
|
+
minItems?: number;
|
|
61
|
+
maxItems?: number;
|
|
62
|
+
visibleWhen?: unknown;
|
|
63
|
+
disabledWhen?: unknown;
|
|
64
|
+
effects?: unknown;
|
|
65
|
+
actionId?: string;
|
|
66
|
+
defaultValue?: unknown;
|
|
67
|
+
schema?: Record<string, unknown>;
|
|
68
|
+
};
|
|
69
|
+
export type FieldControlType = "range" | "number" | "toggle" | "select" | "color" | "text" | "textarea" | "file" | "action" | "array" | "oneOf";
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GA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,UAAU,EAAE,CAAA;KAAE,CAAC,CAAC;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,OAAO,GACP,OAAO,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@treasuryspatial/panel-core",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@treasuryspatial/plugin-manifest": "^0.1.2"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -b",
|
|
25
|
+
"typecheck": "tsc -b --pretty false --noEmit"
|
|
26
|
+
}
|
|
27
|
+
}
|