@superblocksteam/util 1.99.99-next.3 → 2.0.0-SNAPSHOT.03dcbbce5278af46

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.
Files changed (106) hide show
  1. package/dist/api-files/{api.d.mts → api.d.ts} +4 -3
  2. package/dist/api-files/api.d.ts.map +1 -0
  3. package/dist/api-files/{api.mjs → api.js} +5 -5
  4. package/dist/api-files/api.js.map +1 -0
  5. package/dist/api-files/constants.d.ts.map +1 -1
  6. package/dist/api-files/constants.js +2 -5
  7. package/dist/api-files/constants.js.map +1 -1
  8. package/dist/api-files/index.d.ts +1 -6
  9. package/dist/api-files/index.d.ts.map +1 -1
  10. package/dist/api-files/index.js +1 -12
  11. package/dist/api-files/index.js.map +1 -1
  12. package/dist/api-files/types.d.ts +13 -15
  13. package/dist/api-files/types.d.ts.map +1 -1
  14. package/dist/api-files/types.js +3 -9
  15. package/dist/api-files/types.js.map +1 -1
  16. package/dist/constants.d.ts +1 -2
  17. package/dist/constants.d.ts.map +1 -1
  18. package/dist/constants.js +8 -29
  19. package/dist/constants.js.map +1 -1
  20. package/dist/events.d.ts +0 -4
  21. package/dist/events.d.ts.map +1 -1
  22. package/dist/events.js +2 -9
  23. package/dist/events.js.map +1 -1
  24. package/dist/file-uploader.d.ts.map +1 -1
  25. package/dist/file-uploader.js +27 -18
  26. package/dist/file-uploader.js.map +1 -1
  27. package/dist/file-uploader.test.d.ts +2 -0
  28. package/dist/file-uploader.test.d.ts.map +1 -0
  29. package/dist/file-uploader.test.js +42 -0
  30. package/dist/file-uploader.test.js.map +1 -0
  31. package/dist/identifiers.js +3 -8
  32. package/dist/identifiers.js.map +1 -1
  33. package/dist/index.d.ts +1 -3
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +13 -31
  36. package/dist/index.js.map +1 -1
  37. package/dist/localGitRepoState.js +1 -2
  38. package/dist/login.d.ts +6 -0
  39. package/dist/login.d.ts.map +1 -1
  40. package/dist/login.js +38 -54
  41. package/dist/login.js.map +1 -1
  42. package/dist/login.test.d.ts +2 -0
  43. package/dist/login.test.d.ts.map +1 -0
  44. package/dist/login.test.js +64 -0
  45. package/dist/login.test.js.map +1 -0
  46. package/dist/mask-unix-signals.d.ts +2 -1
  47. package/dist/mask-unix-signals.d.ts.map +1 -1
  48. package/dist/mask-unix-signals.js +1 -4
  49. package/dist/mask-unix-signals.js.map +1 -1
  50. package/dist/resource-configs.d.ts +17 -20
  51. package/dist/resource-configs.d.ts.map +1 -1
  52. package/dist/resource-configs.js +54 -99
  53. package/dist/resource-configs.js.map +1 -1
  54. package/dist/token-manager.d.ts +22 -0
  55. package/dist/token-manager.d.ts.map +1 -0
  56. package/dist/token-manager.js +2 -0
  57. package/dist/token-manager.js.map +1 -0
  58. package/dist/unreachable.js +1 -4
  59. package/dist/unreachable.js.map +1 -1
  60. package/package.json +52 -29
  61. package/.prettierrc +0 -18
  62. package/dist/api-files/api.d.mts.map +0 -1
  63. package/dist/api-files/api.mjs.map +0 -1
  64. package/dist/component-configs.d.ts +0 -6
  65. package/dist/component-configs.d.ts.map +0 -1
  66. package/dist/component-configs.js +0 -178
  67. package/dist/component-configs.js.map +0 -1
  68. package/dist/data-types.d.ts +0 -10
  69. package/dist/data-types.d.ts.map +0 -1
  70. package/dist/data-types.js +0 -32
  71. package/dist/data-types.js.map +0 -1
  72. package/dist/generate-component-types.d.ts +0 -3
  73. package/dist/generate-component-types.d.ts.map +0 -1
  74. package/dist/generate-component-types.js +0 -45
  75. package/dist/generate-component-types.js.map +0 -1
  76. package/dist/types.d.ts +0 -105
  77. package/dist/types.d.ts.map +0 -1
  78. package/dist/types.js +0 -3
  79. package/dist/types.js.map +0 -1
  80. package/dist/validation.d.ts +0 -5
  81. package/dist/validation.d.ts.map +0 -1
  82. package/dist/validation.js +0 -152
  83. package/dist/validation.js.map +0 -1
  84. package/eslint.config.js +0 -83
  85. package/src/api-files/api.mts +0 -504
  86. package/src/api-files/constants.ts +0 -6
  87. package/src/api-files/index.ts +0 -15
  88. package/src/api-files/types.ts +0 -134
  89. package/src/component-configs.ts +0 -161
  90. package/src/constants.ts +0 -48
  91. package/src/data-types.ts +0 -39
  92. package/src/events.ts +0 -12
  93. package/src/file-uploader.ts +0 -28
  94. package/src/generate-component-types.ts +0 -53
  95. package/src/identifiers.ts +0 -70
  96. package/src/index.ts +0 -15
  97. package/src/localGitRepoState.ts +0 -20
  98. package/src/login.ts +0 -66
  99. package/src/mask-unix-signals.ts +0 -86
  100. package/src/resource-configs.ts +0 -293
  101. package/src/types.ts +0 -137
  102. package/src/unreachable.ts +0 -5
  103. package/src/validation.ts +0 -155
  104. package/tsconfig.json +0 -20
  105. package/tsconfig.tsbuildinfo +0 -1
  106. package/tsup.config.ts +0 -8
@@ -1,293 +0,0 @@
1
- import path from "path";
2
- import * as fs from "fs-extra";
3
- import { RESOURCE_CONFIG_PATH } from "./constants.js";
4
-
5
- export type SuperblocksMetadata = {
6
- cliVersion: string;
7
- };
8
-
9
- // Resource type is the type of the resource in the Superblocks platform
10
- export type SuperblocksResourceType = "APPLICATION" | "BACKEND";
11
-
12
- // Resource-specific config
13
- export type SuperblocksConfigType =
14
- | "APPLICATION"
15
- | "APPLICATION_V2"
16
- | "BACKEND";
17
-
18
- export type VersionedResourceConfig = {
19
- location: string;
20
- resourceType: SuperblocksResourceType;
21
- };
22
-
23
- export type SuperblocksResourceConfigMetadata = {
24
- fileVersion?: string;
25
- };
26
-
27
- export type SuperblocksResourceConfig = {
28
- id: string;
29
- configType: SuperblocksConfigType;
30
- metadata?: SuperblocksResourceConfigMetadata;
31
- };
32
-
33
- export type SuperblocksBackendConfig = SuperblocksResourceConfig &
34
- SourceFilesContanier & {
35
- configType: "BACKEND";
36
- };
37
-
38
- export type SuperblocksApplicationConfig = SuperblocksResourceConfig & {
39
- configType: "APPLICATION";
40
- defaultPageId?: string;
41
- // @deprecated use pageApis appApis for new format
42
- apis?: Record<string, string>; // used for pre-0.2.0 format
43
- appApis?: Record<string, ApiInfo>; // used for 0.2.0+ format
44
- pages?: Record<string, PageInfo>;
45
- };
46
-
47
- export type PageInfo = {
48
- id: string;
49
- name: string;
50
- // @deprecated use pageApis instead
51
- apis?: Record<string, string>; // used for pre-0.2.0 format
52
- pageApis?: Record<string, ApiInfo>; // used for 0.2.0+ format
53
- };
54
-
55
- export type SourceFilesContanier = {
56
- sourceFiles?: string[];
57
- };
58
-
59
- export type ApiInfo = SourceFilesContanier & {
60
- name: string;
61
- };
62
-
63
- export type SuperblocksApplicationV2Config = SuperblocksResourceConfig & {
64
- configType: "APPLICATION_V2";
65
- };
66
-
67
- export type SuperblocksMonorepoConfig = {
68
- configType: "ROOT";
69
- resources: Record<string, VersionedResourceConfig>;
70
- metadata: SuperblocksMetadata;
71
- };
72
-
73
- export type SuperblocksConfig =
74
- | SuperblocksMonorepoConfig
75
- | SuperblocksApplicationConfig
76
- | SuperblocksApplicationV2Config
77
- | SuperblocksBackendConfig;
78
-
79
- /**
80
- * Get the Superblocks config file from the current directory (and optionally) hierarchy
81
- * @param checkParentDir Whether to recursively check the parent directory for a Superblocks config file
82
- */
83
- export async function getSuperblocksMonorepoConfigJson(
84
- checkParentDir = false,
85
- pathPrefix = "",
86
- ): Promise<[SuperblocksMonorepoConfig, string]> {
87
- const absolutePath = path.resolve(pathPrefix);
88
-
89
- let hasReachedFilesystemRoot = false;
90
- try {
91
- hasReachedFilesystemRoot = path.parse(absolutePath).root == absolutePath;
92
- } catch {
93
- throw new Error("Could not parse path " + absolutePath);
94
- }
95
-
96
- let superblocksConfig;
97
- if (
98
- (pathPrefix && !fs.existsSync(absolutePath)) ||
99
- hasReachedFilesystemRoot
100
- ) {
101
- throw new Error(
102
- "No Superblocks config file found in current directory hierarchy " +
103
- pathPrefix,
104
- );
105
- }
106
-
107
- const attemptedPath = path.join(absolutePath, RESOURCE_CONFIG_PATH);
108
- try {
109
- superblocksConfig = await fs.readJSON(attemptedPath);
110
- if (superblocksConfig.configType !== "ROOT") {
111
- throw new Error("Not the root Superblocks config file");
112
- }
113
- return [superblocksConfig as SuperblocksMonorepoConfig, attemptedPath];
114
- } catch {
115
- if (!checkParentDir) {
116
- // no superblocks config file found
117
- throw new Error(
118
- "No Superblocks config file found in current directory " +
119
- attemptedPath,
120
- );
121
- }
122
- return getSuperblocksMonorepoConfigJson(true, "../" + pathPrefix);
123
- }
124
- }
125
-
126
- export async function getSuperblocksApplicationConfigJson(
127
- applicationPath?: string,
128
- ): Promise<SuperblocksApplicationConfig> {
129
- let superblocksConfig;
130
- try {
131
- const configPath = applicationPath
132
- ? path.join(applicationPath, RESOURCE_CONFIG_PATH)
133
- : RESOURCE_CONFIG_PATH;
134
- superblocksConfig = await fs.readJSON(configPath);
135
- } catch {
136
- // no superblocks config file found
137
- throw new Error(
138
- "This command must be run within a Superblocks app directory.",
139
- );
140
- }
141
-
142
- if (superblocksConfig.configType !== "APPLICATION") {
143
- throw new Error(
144
- "Please execute this command within a Superblocks application directory.",
145
- );
146
- }
147
-
148
- return superblocksConfig as SuperblocksApplicationConfig;
149
- }
150
-
151
- export async function getSuperblocksApplicationConfigIfExists(
152
- applicationPath: string,
153
- ): Promise<SuperblocksApplicationConfig | undefined> {
154
- let superblocksConfig: SuperblocksApplicationConfig | undefined;
155
- try {
156
- const configPath = applicationPath
157
- ? path.join(applicationPath, RESOURCE_CONFIG_PATH)
158
- : RESOURCE_CONFIG_PATH;
159
- superblocksConfig = await fs.readJSON(configPath);
160
- } catch {
161
- // no superblocks config file found
162
- }
163
-
164
- if (superblocksConfig?.configType !== "APPLICATION") {
165
- return undefined;
166
- }
167
-
168
- return superblocksConfig as SuperblocksApplicationConfig;
169
- }
170
-
171
- export async function getSuperblocksApplicationV2ConfigJson(
172
- applicationPath?: string,
173
- ): Promise<SuperblocksApplicationV2Config> {
174
- let superblocksConfig;
175
- try {
176
- const configPath = applicationPath
177
- ? path.join(applicationPath, RESOURCE_CONFIG_PATH)
178
- : RESOURCE_CONFIG_PATH;
179
- superblocksConfig = await fs.readJSON(configPath);
180
- } catch {
181
- // no superblocks config file found
182
- throw new Error(
183
- "This command must be run within a Superblocks app directory.",
184
- );
185
- }
186
-
187
- if (superblocksConfig.configType !== "APPLICATION_V2") {
188
- throw new Error(
189
- "Please execute this command within a Superblocks application directory.",
190
- );
191
- }
192
-
193
- return superblocksConfig as SuperblocksApplicationV2Config;
194
- }
195
-
196
- export async function getSuperblocksBackendConfigIfExists(
197
- backendPath: string,
198
- ): Promise<SuperblocksBackendConfig | undefined> {
199
- let superblocksConfig: SuperblocksBackendConfig | undefined;
200
- try {
201
- const configPath = backendPath
202
- ? path.join(backendPath, RESOURCE_CONFIG_PATH)
203
- : RESOURCE_CONFIG_PATH;
204
- superblocksConfig = await fs.readJSON(configPath);
205
- } catch {
206
- // no superblocks config file found
207
- }
208
-
209
- if (superblocksConfig?.configType !== "BACKEND") {
210
- return undefined;
211
- }
212
-
213
- return superblocksConfig as SuperblocksBackendConfig;
214
- }
215
-
216
- export async function getSuperblocksBackendConfigJson(): Promise<SuperblocksBackendConfig> {
217
- let superblocksConfig;
218
- try {
219
- superblocksConfig = await fs.readJSON(RESOURCE_CONFIG_PATH);
220
- } catch {
221
- // no superblocks config file found
222
- throw new Error(
223
- "This command must be run within a Superblocks backend resource (workflow/job) directory.",
224
- );
225
- }
226
-
227
- if (superblocksConfig.configType !== "BACKEND") {
228
- throw new Error(
229
- "Please execute this command within a Superblocks backend resource (workflow/job) directory.",
230
- );
231
- }
232
-
233
- return superblocksConfig as SuperblocksBackendConfig;
234
- }
235
-
236
- export async function getSuperblocksResourceConfigIfExists(): Promise<
237
- SuperblocksResourceConfig | undefined
238
- > {
239
- let config: SuperblocksResourceConfig | undefined;
240
- try {
241
- config = await getSuperblocksApplicationConfigJson();
242
- } catch {
243
- // Noop
244
- }
245
- try {
246
- config = await getSuperblocksApplicationV2ConfigJson();
247
- } catch {
248
- // Noop
249
- }
250
- try {
251
- config = await getSuperblocksBackendConfigJson();
252
- } catch {
253
- // Noop
254
- }
255
- return config;
256
- }
257
-
258
- export function getResourceIdFromUrl(
259
- resourceUrl: any,
260
- ): [string, SuperblocksResourceType] {
261
- const url = new URL(resourceUrl);
262
- if (url.pathname.startsWith("/code-mode")) {
263
- // find the first uuid in the url
264
- const tokens = url.pathname.split("/");
265
- const uuid = tokens.find((token) =>
266
- token.match(
267
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
268
- ),
269
- );
270
- if (!uuid) {
271
- throw new Error(`Failed to parse resource URL: ${resourceUrl}`);
272
- }
273
- return [uuid, "APPLICATION"];
274
- }
275
- if (url.pathname.startsWith("/applications")) {
276
- const tokens = url.pathname.split("/");
277
- if (tokens.length < 2) {
278
- throw new Error(`Failed to parse resource URL: ${resourceUrl}`);
279
- }
280
- if (tokens[2] === "edit") {
281
- return [tokens[3], "APPLICATION"];
282
- } else {
283
- return [tokens[2], "APPLICATION"];
284
- }
285
- } else if (
286
- url.pathname.startsWith("/workflows") ||
287
- url.pathname.startsWith("/scheduled_jobs")
288
- ) {
289
- return [url.pathname.split("/")[2], "BACKEND"];
290
- }
291
-
292
- throw new Error(`Failed to parse resource URL: ${resourceUrl}`);
293
- }
package/src/types.ts DELETED
@@ -1,137 +0,0 @@
1
- import type { DataType } from "./data-types.js";
2
- import type { UUID } from "node:crypto";
3
-
4
- interface PropertiesPanelDisplay<T extends DataType> {
5
- /**
6
- * Determines what form item type is shown in the Superblocks properties panel.
7
- *
8
- * Only booleans are allowed to use the "switch" control
9
- */
10
- controlType: T extends "boolean"
11
- ? "text" | "js-expr" | "switch"
12
- : "text" | "js-expr";
13
-
14
- /**
15
- * Determines form item label in the Superblocks properties panel.
16
- */
17
- label: string;
18
-
19
- /**
20
- * Placeholder text appears as gray text in the properties panel. This only applies
21
- * to text-like inputs.
22
- */
23
- placeholder?: string;
24
-
25
- /**
26
- * This shows up in the popover as a user types into the properties panel.
27
- * This is a documentation field that helps users understand what type of data is accepted
28
- * by this property. You should give a specific example, not a generic type
29
- *
30
- * @example {
31
- * label: "My Label",
32
- * value: "myValue"
33
- * }
34
- */
35
- exampleData?: string;
36
-
37
- /**
38
- * This shows up in the popover as a user types into the properties panel.
39
- * This is a documentation field that helps users understand what type of data is accepted
40
- * by this property. Typescript notation is recommended.
41
- *
42
- * @example "Array<{ label: string; value: string; }>"
43
- */
44
- expectedType?: string;
45
-
46
- /**
47
- * The default value should match the dataType of the property.
48
- */
49
- defaultValue?: T;
50
-
51
- /**
52
- * The default value to use when adding a property.
53
- */
54
- defaultOnAdd?: T;
55
- }
56
-
57
- export interface PropertyForData<T extends DataType> {
58
- path: string;
59
- dataType: T;
60
-
61
- /**
62
- * The presence of this object determines whether or not this property
63
- * shows up in the Superblocks properties panel.
64
- **/
65
- propertiesPanelDisplay?: PropertiesPanelDisplay<T>;
66
-
67
- /**
68
- * A description of this property. This is used in the Superblocks properties panel
69
- * as well as in the custom component's autocomplete.
70
- **/
71
- description?: string;
72
-
73
- /**
74
- * By default, all your properties are readable from anywhere in Superblocks using dot notation
75
- * (e.g. `myComponent.myProperty`). If you want to hide a property from the outside world,
76
- * set this to false
77
- * @default true
78
- */
79
- isExternallyReadable?: boolean;
80
-
81
- /**
82
- * By default, all properties can have be used with Set Component Property and Reset Component to Default.
83
- * @default true
84
- **/
85
- isExternallySettable?: boolean;
86
- }
87
-
88
- export type Property =
89
- | PropertyForData<"string">
90
- | PropertyForData<"number">
91
- | PropertyForData<"boolean">
92
- | PropertyForData<"any">;
93
-
94
- export interface ComponentConfig {
95
- id: UUID;
96
-
97
- /**
98
- * @example: "myComponent"
99
- */
100
- name: string;
101
-
102
- /**
103
- * @example "My Component"
104
- */
105
- displayName: string;
106
-
107
- /**
108
- * @example "components/myComponent/component.tsx"
109
- */
110
- componentPath: string;
111
-
112
- properties: Array<
113
- // Note to devs: The reason we are duplicating the Property type above is that it produces a better
114
- // error message. The user will see 'is not assignable to type PropertyForData<"string"> | PropertyForData<"number">'
115
- // instead of seeing "is not assignable to type Property"
116
- | PropertyForData<"string">
117
- | PropertyForData<"number">
118
- | PropertyForData<"boolean">
119
- | PropertyForData<"any">
120
- >;
121
-
122
- /**
123
- * @example [{
124
- * label: "On Click",
125
- * path: "onClick",
126
- * }]
127
- */
128
- events: Array<{
129
- label: string;
130
- path: string;
131
- }>;
132
-
133
- gridDimensions?: {
134
- initialColumns: number;
135
- initialRows: number;
136
- };
137
- }
@@ -1,5 +0,0 @@
1
- export function unreachable(value: never, errMsg?: string): never {
2
- throw new TypeError(
3
- errMsg ?? "Encountered impossible value: " + JSON.stringify(value),
4
- );
5
- }
package/src/validation.ts DELETED
@@ -1,155 +0,0 @@
1
- import Ajv from "ajv";
2
- import betterAjvErrors from "better-ajv-errors";
3
- import { isReservedPropertyName, isValidIdentifier } from "./identifiers.js";
4
- import type { Schema } from "ajv";
5
- import type { DataValidateFunction } from "ajv/dist/types";
6
-
7
- const ajv = new Ajv();
8
-
9
- ajv.addKeyword({
10
- keyword: "stringFormat",
11
- compile: (schema: any) => {
12
- let validateFunc: DataValidateFunction;
13
- // schema is the value assigned to stringFormat in the schema
14
- if (schema === "identifier") {
15
- validateFunc = (data: any) => {
16
- if (typeof data != "string") return false;
17
- if (!isValidIdentifier(data)) {
18
- validateFunc.errors = [
19
- {
20
- keyword: "format",
21
- message:
22
- "must be a valid identifier starting with a-z or underscore and containing only a-z, 0-9, and underscores",
23
- },
24
- ];
25
- return false;
26
- }
27
- if (isReservedPropertyName(data)) {
28
- validateFunc.errors = [
29
- {
30
- keyword: "format",
31
- message:
32
- "must not match a reserved property path (see https://docs.superblocks.com/applications/custom-components/faq#what-is-a-reserved-property)",
33
- },
34
- ];
35
- return false;
36
- }
37
- return true;
38
- };
39
- } else {
40
- throw new Error(`Unknown stringFormat: ${schema}`);
41
- }
42
- return validateFunc;
43
- },
44
- errors: true,
45
- });
46
-
47
- const componentSchema: Schema = {
48
- type: "object",
49
- properties: {
50
- id: { type: "string" },
51
- name: { type: "string" },
52
- displayName: { type: "string" },
53
- componentPath: { type: "string" },
54
- properties: {
55
- type: "array",
56
- items: {
57
- $ref: "#/definitions/Property",
58
- },
59
- },
60
- events: {
61
- type: "array",
62
- items: {
63
- $ref: "#/definitions/EventHandler",
64
- },
65
- },
66
- gridDimensions: {
67
- type: "object",
68
- properties: {
69
- initialColumns: { type: "number" },
70
- initialRows: { type: "number" },
71
- },
72
- additionalProperties: false,
73
- required: ["initialColumns", "initialRows"],
74
- },
75
- },
76
- required: [
77
- "id",
78
- "name",
79
- "displayName",
80
- "componentPath",
81
- "properties",
82
- "events",
83
- ],
84
- additionalProperties: false,
85
- definitions: {
86
- Property: {
87
- properties: {
88
- path: { $ref: "#/definitions/Identifier" },
89
- dataType: { enum: ["number", "boolean", "string", "any"] },
90
- propertiesPanelDisplay: {
91
- type: "object",
92
- properties: {
93
- label: { type: "string" },
94
- controlType: { enum: ["text", "js-expr", "switch"] },
95
- defaultValue: {
96
- oneOf: [
97
- {
98
- type: "string",
99
- },
100
- {
101
- type: "boolean",
102
- },
103
- {
104
- type: "number",
105
- },
106
- ],
107
- },
108
- placeholder: { type: "string" },
109
- exampleData: { type: "string" },
110
- expectedType: { type: "string" },
111
- },
112
- required: ["controlType", "label"],
113
- additionalProperties: false,
114
- },
115
- description: { type: "string" },
116
- isExternallySettable: { type: "boolean" },
117
- isExternallyReadable: { type: "boolean" },
118
- },
119
- type: "object",
120
- additionalProperties: false,
121
- required: ["path", "dataType"],
122
- },
123
- EventHandler: {
124
- properties: {
125
- label: { type: "string" },
126
- path: { $ref: "#/definitions/Identifier" },
127
- },
128
- type: "object",
129
- additionalProperties: false,
130
- required: ["label", "path"],
131
- },
132
- Identifier: {
133
- type: "string",
134
- stringFormat: "identifier",
135
- },
136
- },
137
- };
138
-
139
- const validate = ajv.compile(componentSchema);
140
-
141
- export function validateCustomComponents(data: any): {
142
- valid: boolean;
143
- message?: string;
144
- } {
145
- const valid = validate(data);
146
- if (!valid) {
147
- return {
148
- valid: false,
149
- message: betterAjvErrors(componentSchema, data, validate.errors as any, {
150
- indent: 2,
151
- }),
152
- };
153
- }
154
- return { valid: true };
155
- }
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "declaration": true,
4
- "module": "nodenext",
5
- "moduleDetection": "force",
6
- "moduleResolution": "nodenext",
7
- "isolatedModules": true,
8
- "outDir": "dist",
9
- "rootDir": "src",
10
- "strict": true,
11
- "composite": true,
12
- "target": "es2022",
13
- "lib": ["es2022"],
14
- "sourceMap": true,
15
- "declarationMap": true,
16
- "esModuleInterop": true,
17
- "skipLibCheck": true
18
- },
19
- "include": ["src/**/*"]
20
- }