@djvlc/contracts-types 1.0.0
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.d.mts +1958 -0
- package/dist/index.d.ts +1958 -0
- package/dist/index.js +697 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +643 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +59 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
ACTION_SPEC_VERSION: () => ACTION_SPEC_VERSION,
|
|
24
|
+
ALLOWED_ROOT_VARIABLES: () => ALLOWED_ROOT_VARIABLES,
|
|
25
|
+
BUILTIN_FUNCTIONS: () => BUILTIN_FUNCTIONS,
|
|
26
|
+
BUILTIN_FUNCTION_NAMES: () => BUILTIN_FUNCTION_NAMES,
|
|
27
|
+
COMPONENT_CATEGORIES: () => COMPONENT_CATEGORIES,
|
|
28
|
+
COMPONENT_META_SCHEMA_VERSION: () => COMPONENT_META_SCHEMA_VERSION,
|
|
29
|
+
CURRENT_SCHEMA_VERSION: () => CURRENT_SCHEMA_VERSION,
|
|
30
|
+
DATA_QUERY_SPEC_VERSION: () => DATA_QUERY_SPEC_VERSION,
|
|
31
|
+
ErrorCode: () => ErrorCode,
|
|
32
|
+
ErrorCodeCategory: () => ErrorCodeCategory,
|
|
33
|
+
ErrorMessages: () => ErrorMessages,
|
|
34
|
+
PAGE_SCHEMA_VERSION: () => PAGE_SCHEMA_VERSION,
|
|
35
|
+
PublishStatus: () => PublishStatus,
|
|
36
|
+
SCHEMA_VERSIONS: () => SCHEMA_VERSIONS,
|
|
37
|
+
compareVersions: () => compareVersions,
|
|
38
|
+
createDjvlcError: () => createDjvlcError,
|
|
39
|
+
createExpressionBinding: () => createExpressionBinding,
|
|
40
|
+
findMigrationPath: () => findMigrationPath,
|
|
41
|
+
getAllMigrations: () => getAllMigrations,
|
|
42
|
+
getContractsVersion: () => getContractsVersion,
|
|
43
|
+
getHttpStatusFromErrorCode: () => getHttpStatusFromErrorCode,
|
|
44
|
+
getVersionInfo: () => getVersionInfo,
|
|
45
|
+
isExpressionBinding: () => isExpressionBinding,
|
|
46
|
+
isRetryableError: () => isRetryableError,
|
|
47
|
+
isVersionCompatible: () => isVersionCompatible,
|
|
48
|
+
migratePageSchema: () => migratePageSchema,
|
|
49
|
+
needsMigration: () => needsMigration,
|
|
50
|
+
registerMigration: () => registerMigration
|
|
51
|
+
});
|
|
52
|
+
module.exports = __toCommonJS(index_exports);
|
|
53
|
+
|
|
54
|
+
// src/version.ts
|
|
55
|
+
var PAGE_SCHEMA_VERSION = "1.0.0";
|
|
56
|
+
var COMPONENT_META_SCHEMA_VERSION = "1.0.0";
|
|
57
|
+
var ACTION_SPEC_VERSION = "1.0.0";
|
|
58
|
+
var DATA_QUERY_SPEC_VERSION = "1.0.0";
|
|
59
|
+
function getContractsVersion() {
|
|
60
|
+
return {
|
|
61
|
+
pageSchema: PAGE_SCHEMA_VERSION,
|
|
62
|
+
componentMeta: COMPONENT_META_SCHEMA_VERSION,
|
|
63
|
+
actionSpec: ACTION_SPEC_VERSION,
|
|
64
|
+
dataQuerySpec: DATA_QUERY_SPEC_VERSION
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function isVersionCompatible(required, current) {
|
|
68
|
+
const [reqMajor, reqMinor] = required.split(".").map(Number);
|
|
69
|
+
const [curMajor, curMinor] = current.split(".").map(Number);
|
|
70
|
+
return curMajor === reqMajor && curMinor >= reqMinor;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// src/errors/index.ts
|
|
74
|
+
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
75
|
+
ErrorCode2[ErrorCode2["UNKNOWN"] = 1e3] = "UNKNOWN";
|
|
76
|
+
ErrorCode2[ErrorCode2["INVALID_REQUEST"] = 1001] = "INVALID_REQUEST";
|
|
77
|
+
ErrorCode2[ErrorCode2["UNAUTHORIZED"] = 1002] = "UNAUTHORIZED";
|
|
78
|
+
ErrorCode2[ErrorCode2["FORBIDDEN"] = 1003] = "FORBIDDEN";
|
|
79
|
+
ErrorCode2[ErrorCode2["NOT_FOUND"] = 1004] = "NOT_FOUND";
|
|
80
|
+
ErrorCode2[ErrorCode2["RATE_LIMITED"] = 1005] = "RATE_LIMITED";
|
|
81
|
+
ErrorCode2[ErrorCode2["VALIDATION_ERROR"] = 1006] = "VALIDATION_ERROR";
|
|
82
|
+
ErrorCode2[ErrorCode2["INTERNAL_ERROR"] = 1007] = "INTERNAL_ERROR";
|
|
83
|
+
ErrorCode2[ErrorCode2["SERVICE_UNAVAILABLE"] = 1008] = "SERVICE_UNAVAILABLE";
|
|
84
|
+
ErrorCode2[ErrorCode2["TIMEOUT"] = 1009] = "TIMEOUT";
|
|
85
|
+
ErrorCode2[ErrorCode2["ACTION_NOT_FOUND"] = 2001] = "ACTION_NOT_FOUND";
|
|
86
|
+
ErrorCode2[ErrorCode2["ACTION_INVALID_PARAMS"] = 2002] = "ACTION_INVALID_PARAMS";
|
|
87
|
+
ErrorCode2[ErrorCode2["ACTION_EXECUTION_FAILED"] = 2003] = "ACTION_EXECUTION_FAILED";
|
|
88
|
+
ErrorCode2[ErrorCode2["ACTION_IDEMPOTENCY_CONFLICT"] = 2004] = "ACTION_IDEMPOTENCY_CONFLICT";
|
|
89
|
+
ErrorCode2[ErrorCode2["ACTION_BLOCKED"] = 2005] = "ACTION_BLOCKED";
|
|
90
|
+
ErrorCode2[ErrorCode2["ACTION_RISK_REJECTED"] = 2006] = "ACTION_RISK_REJECTED";
|
|
91
|
+
ErrorCode2[ErrorCode2["ACTION_EXPIRED"] = 2007] = "ACTION_EXPIRED";
|
|
92
|
+
ErrorCode2[ErrorCode2["ACTION_QUOTA_EXCEEDED"] = 2008] = "ACTION_QUOTA_EXCEEDED";
|
|
93
|
+
ErrorCode2[ErrorCode2["QUERY_NOT_FOUND"] = 3001] = "QUERY_NOT_FOUND";
|
|
94
|
+
ErrorCode2[ErrorCode2["QUERY_INVALID_PARAMS"] = 3002] = "QUERY_INVALID_PARAMS";
|
|
95
|
+
ErrorCode2[ErrorCode2["QUERY_EXECUTION_FAILED"] = 3003] = "QUERY_EXECUTION_FAILED";
|
|
96
|
+
ErrorCode2[ErrorCode2["QUERY_FIELD_NOT_ALLOWED"] = 3004] = "QUERY_FIELD_NOT_ALLOWED";
|
|
97
|
+
ErrorCode2[ErrorCode2["QUERY_TIMEOUT"] = 3005] = "QUERY_TIMEOUT";
|
|
98
|
+
ErrorCode2[ErrorCode2["QUERY_DISABLED"] = 3006] = "QUERY_DISABLED";
|
|
99
|
+
ErrorCode2[ErrorCode2["COMPONENT_NOT_FOUND"] = 4001] = "COMPONENT_NOT_FOUND";
|
|
100
|
+
ErrorCode2[ErrorCode2["COMPONENT_VERSION_NOT_FOUND"] = 4002] = "COMPONENT_VERSION_NOT_FOUND";
|
|
101
|
+
ErrorCode2[ErrorCode2["COMPONENT_BLOCKED"] = 4003] = "COMPONENT_BLOCKED";
|
|
102
|
+
ErrorCode2[ErrorCode2["COMPONENT_INTEGRITY_MISMATCH"] = 4004] = "COMPONENT_INTEGRITY_MISMATCH";
|
|
103
|
+
ErrorCode2[ErrorCode2["COMPONENT_INCOMPATIBLE"] = 4005] = "COMPONENT_INCOMPATIBLE";
|
|
104
|
+
ErrorCode2[ErrorCode2["COMPONENT_LOAD_FAILED"] = 4006] = "COMPONENT_LOAD_FAILED";
|
|
105
|
+
ErrorCode2[ErrorCode2["COMPONENT_RENDER_ERROR"] = 4007] = "COMPONENT_RENDER_ERROR";
|
|
106
|
+
ErrorCode2[ErrorCode2["PAGE_NOT_FOUND"] = 5001] = "PAGE_NOT_FOUND";
|
|
107
|
+
ErrorCode2[ErrorCode2["PAGE_VERSION_NOT_FOUND"] = 5002] = "PAGE_VERSION_NOT_FOUND";
|
|
108
|
+
ErrorCode2[ErrorCode2["PAGE_SCHEMA_INVALID"] = 5003] = "PAGE_SCHEMA_INVALID";
|
|
109
|
+
ErrorCode2[ErrorCode2["PAGE_MANIFEST_INVALID"] = 5004] = "PAGE_MANIFEST_INVALID";
|
|
110
|
+
ErrorCode2[ErrorCode2["PAGE_PUBLISH_FAILED"] = 5005] = "PAGE_PUBLISH_FAILED";
|
|
111
|
+
ErrorCode2[ErrorCode2["PAGE_ROLLBACK_FAILED"] = 5006] = "PAGE_ROLLBACK_FAILED";
|
|
112
|
+
ErrorCode2[ErrorCode2["ACTIVITY_NOT_FOUND"] = 6001] = "ACTIVITY_NOT_FOUND";
|
|
113
|
+
ErrorCode2[ErrorCode2["ACTIVITY_NOT_STARTED"] = 6002] = "ACTIVITY_NOT_STARTED";
|
|
114
|
+
ErrorCode2[ErrorCode2["ACTIVITY_ENDED"] = 6003] = "ACTIVITY_ENDED";
|
|
115
|
+
ErrorCode2[ErrorCode2["ACTIVITY_ALREADY_CLAIMED"] = 6004] = "ACTIVITY_ALREADY_CLAIMED";
|
|
116
|
+
ErrorCode2[ErrorCode2["ACTIVITY_ALREADY_SIGNED"] = 6005] = "ACTIVITY_ALREADY_SIGNED";
|
|
117
|
+
ErrorCode2[ErrorCode2["ACTIVITY_LIMIT_EXCEEDED"] = 6006] = "ACTIVITY_LIMIT_EXCEEDED";
|
|
118
|
+
ErrorCode2[ErrorCode2["ACTIVITY_DISABLED"] = 6007] = "ACTIVITY_DISABLED";
|
|
119
|
+
ErrorCode2[ErrorCode2["EXPRESSION_SYNTAX_ERROR"] = 7001] = "EXPRESSION_SYNTAX_ERROR";
|
|
120
|
+
ErrorCode2[ErrorCode2["EXPRESSION_UNKNOWN_FUNCTION"] = 7002] = "EXPRESSION_UNKNOWN_FUNCTION";
|
|
121
|
+
ErrorCode2[ErrorCode2["EXPRESSION_INVALID_ARGUMENT"] = 7003] = "EXPRESSION_INVALID_ARGUMENT";
|
|
122
|
+
ErrorCode2[ErrorCode2["EXPRESSION_UNKNOWN_VARIABLE"] = 7004] = "EXPRESSION_UNKNOWN_VARIABLE";
|
|
123
|
+
ErrorCode2[ErrorCode2["EXPRESSION_TYPE_MISMATCH"] = 7005] = "EXPRESSION_TYPE_MISMATCH";
|
|
124
|
+
ErrorCode2[ErrorCode2["EXPRESSION_ACCESS_DENIED"] = 7006] = "EXPRESSION_ACCESS_DENIED";
|
|
125
|
+
ErrorCode2[ErrorCode2["SCHEMA_VERSION_MISMATCH"] = 8001] = "SCHEMA_VERSION_MISMATCH";
|
|
126
|
+
ErrorCode2[ErrorCode2["MIGRATION_FAILED"] = 8002] = "MIGRATION_FAILED";
|
|
127
|
+
ErrorCode2[ErrorCode2["MIGRATION_NOT_FOUND"] = 8003] = "MIGRATION_NOT_FOUND";
|
|
128
|
+
ErrorCode2[ErrorCode2["VERSION_INCOMPATIBLE"] = 8004] = "VERSION_INCOMPATIBLE";
|
|
129
|
+
return ErrorCode2;
|
|
130
|
+
})(ErrorCode || {});
|
|
131
|
+
var ErrorCodeCategory = {
|
|
132
|
+
GENERAL: [1e3, 1999],
|
|
133
|
+
ACTION: [2e3, 2999],
|
|
134
|
+
QUERY: [3e3, 3999],
|
|
135
|
+
COMPONENT: [4e3, 4999],
|
|
136
|
+
PAGE: [5e3, 5999],
|
|
137
|
+
ACTIVITY: [6e3, 6999],
|
|
138
|
+
EXPRESSION: [7e3, 7999],
|
|
139
|
+
VERSION: [8e3, 8999]
|
|
140
|
+
};
|
|
141
|
+
var ErrorMessages = {
|
|
142
|
+
// 通用错误
|
|
143
|
+
[1e3 /* UNKNOWN */]: "\u672A\u77E5\u9519\u8BEF",
|
|
144
|
+
[1001 /* INVALID_REQUEST */]: "\u8BF7\u6C42\u53C2\u6570\u65E0\u6548",
|
|
145
|
+
[1002 /* UNAUTHORIZED */]: "\u672A\u6388\u6743\u8BBF\u95EE",
|
|
146
|
+
[1003 /* FORBIDDEN */]: "\u7981\u6B62\u8BBF\u95EE",
|
|
147
|
+
[1004 /* NOT_FOUND */]: "\u8D44\u6E90\u4E0D\u5B58\u5728",
|
|
148
|
+
[1005 /* RATE_LIMITED */]: "\u8BF7\u6C42\u9891\u7387\u8D85\u9650",
|
|
149
|
+
[1006 /* VALIDATION_ERROR */]: "\u6570\u636E\u6821\u9A8C\u5931\u8D25",
|
|
150
|
+
[1007 /* INTERNAL_ERROR */]: "\u670D\u52A1\u5185\u90E8\u9519\u8BEF",
|
|
151
|
+
[1008 /* SERVICE_UNAVAILABLE */]: "\u670D\u52A1\u6682\u4E0D\u53EF\u7528",
|
|
152
|
+
[1009 /* TIMEOUT */]: "\u8BF7\u6C42\u8D85\u65F6",
|
|
153
|
+
// Action 错误
|
|
154
|
+
[2001 /* ACTION_NOT_FOUND */]: "\u52A8\u4F5C\u4E0D\u5B58\u5728",
|
|
155
|
+
[2002 /* ACTION_INVALID_PARAMS */]: "\u52A8\u4F5C\u53C2\u6570\u65E0\u6548",
|
|
156
|
+
[2003 /* ACTION_EXECUTION_FAILED */]: "\u52A8\u4F5C\u6267\u884C\u5931\u8D25",
|
|
157
|
+
[2004 /* ACTION_IDEMPOTENCY_CONFLICT */]: "\u91CD\u590D\u8BF7\u6C42",
|
|
158
|
+
[2005 /* ACTION_BLOCKED */]: "\u52A8\u4F5C\u5DF2\u88AB\u7981\u7528",
|
|
159
|
+
[2006 /* ACTION_RISK_REJECTED */]: "\u98CE\u63A7\u62D2\u7EDD",
|
|
160
|
+
[2007 /* ACTION_EXPIRED */]: "\u52A8\u4F5C\u5DF2\u8FC7\u671F",
|
|
161
|
+
[2008 /* ACTION_QUOTA_EXCEEDED */]: "\u914D\u989D\u5DF2\u7528\u5C3D",
|
|
162
|
+
// Data Query 错误
|
|
163
|
+
[3001 /* QUERY_NOT_FOUND */]: "\u67E5\u8BE2\u4E0D\u5B58\u5728",
|
|
164
|
+
[3002 /* QUERY_INVALID_PARAMS */]: "\u67E5\u8BE2\u53C2\u6570\u65E0\u6548",
|
|
165
|
+
[3003 /* QUERY_EXECUTION_FAILED */]: "\u67E5\u8BE2\u6267\u884C\u5931\u8D25",
|
|
166
|
+
[3004 /* QUERY_FIELD_NOT_ALLOWED */]: "\u5B57\u6BB5\u8BBF\u95EE\u88AB\u62D2\u7EDD",
|
|
167
|
+
[3005 /* QUERY_TIMEOUT */]: "\u67E5\u8BE2\u8D85\u65F6",
|
|
168
|
+
[3006 /* QUERY_DISABLED */]: "\u67E5\u8BE2\u5DF2\u7981\u7528",
|
|
169
|
+
// 组件错误
|
|
170
|
+
[4001 /* COMPONENT_NOT_FOUND */]: "\u7EC4\u4EF6\u4E0D\u5B58\u5728",
|
|
171
|
+
[4002 /* COMPONENT_VERSION_NOT_FOUND */]: "\u7EC4\u4EF6\u7248\u672C\u4E0D\u5B58\u5728",
|
|
172
|
+
[4003 /* COMPONENT_BLOCKED */]: "\u7EC4\u4EF6\u5DF2\u88AB\u7981\u7528",
|
|
173
|
+
[4004 /* COMPONENT_INTEGRITY_MISMATCH */]: "\u7EC4\u4EF6\u5B8C\u6574\u6027\u6821\u9A8C\u5931\u8D25",
|
|
174
|
+
[4005 /* COMPONENT_INCOMPATIBLE */]: "\u7EC4\u4EF6\u7248\u672C\u4E0D\u517C\u5BB9",
|
|
175
|
+
[4006 /* COMPONENT_LOAD_FAILED */]: "\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25",
|
|
176
|
+
[4007 /* COMPONENT_RENDER_ERROR */]: "\u7EC4\u4EF6\u6E32\u67D3\u9519\u8BEF",
|
|
177
|
+
// 页面错误
|
|
178
|
+
[5001 /* PAGE_NOT_FOUND */]: "\u9875\u9762\u4E0D\u5B58\u5728",
|
|
179
|
+
[5002 /* PAGE_VERSION_NOT_FOUND */]: "\u9875\u9762\u7248\u672C\u4E0D\u5B58\u5728",
|
|
180
|
+
[5003 /* PAGE_SCHEMA_INVALID */]: "\u9875\u9762 Schema \u65E0\u6548",
|
|
181
|
+
[5004 /* PAGE_MANIFEST_INVALID */]: "\u9875\u9762 Manifest \u65E0\u6548",
|
|
182
|
+
[5005 /* PAGE_PUBLISH_FAILED */]: "\u9875\u9762\u53D1\u5E03\u5931\u8D25",
|
|
183
|
+
[5006 /* PAGE_ROLLBACK_FAILED */]: "\u9875\u9762\u56DE\u6EDA\u5931\u8D25",
|
|
184
|
+
// 活动错误
|
|
185
|
+
[6001 /* ACTIVITY_NOT_FOUND */]: "\u6D3B\u52A8\u4E0D\u5B58\u5728",
|
|
186
|
+
[6002 /* ACTIVITY_NOT_STARTED */]: "\u6D3B\u52A8\u672A\u5F00\u59CB",
|
|
187
|
+
[6003 /* ACTIVITY_ENDED */]: "\u6D3B\u52A8\u5DF2\u7ED3\u675F",
|
|
188
|
+
[6004 /* ACTIVITY_ALREADY_CLAIMED */]: "\u5DF2\u9886\u53D6\u8FC7",
|
|
189
|
+
[6005 /* ACTIVITY_ALREADY_SIGNED */]: "\u4ECA\u65E5\u5DF2\u7B7E\u5230",
|
|
190
|
+
[6006 /* ACTIVITY_LIMIT_EXCEEDED */]: "\u8D85\u51FA\u9886\u53D6\u9650\u5236",
|
|
191
|
+
[6007 /* ACTIVITY_DISABLED */]: "\u6D3B\u52A8\u5DF2\u7981\u7528",
|
|
192
|
+
// 表达式错误
|
|
193
|
+
[7001 /* EXPRESSION_SYNTAX_ERROR */]: "\u8868\u8FBE\u5F0F\u8BED\u6CD5\u9519\u8BEF",
|
|
194
|
+
[7002 /* EXPRESSION_UNKNOWN_FUNCTION */]: "\u672A\u77E5\u51FD\u6570",
|
|
195
|
+
[7003 /* EXPRESSION_INVALID_ARGUMENT */]: "\u65E0\u6548\u53C2\u6570",
|
|
196
|
+
[7004 /* EXPRESSION_UNKNOWN_VARIABLE */]: "\u672A\u77E5\u53D8\u91CF",
|
|
197
|
+
[7005 /* EXPRESSION_TYPE_MISMATCH */]: "\u7C7B\u578B\u4E0D\u5339\u914D",
|
|
198
|
+
[7006 /* EXPRESSION_ACCESS_DENIED */]: "\u8BBF\u95EE\u88AB\u62D2\u7EDD",
|
|
199
|
+
// 版本/迁移错误
|
|
200
|
+
[8001 /* SCHEMA_VERSION_MISMATCH */]: "Schema \u7248\u672C\u4E0D\u5339\u914D",
|
|
201
|
+
[8002 /* MIGRATION_FAILED */]: "\u8FC1\u79FB\u5931\u8D25",
|
|
202
|
+
[8003 /* MIGRATION_NOT_FOUND */]: "\u8FC1\u79FB\u811A\u672C\u4E0D\u5B58\u5728",
|
|
203
|
+
[8004 /* VERSION_INCOMPATIBLE */]: "\u7248\u672C\u4E0D\u517C\u5BB9"
|
|
204
|
+
};
|
|
205
|
+
function createDjvlcError(code, details, traceId) {
|
|
206
|
+
return {
|
|
207
|
+
code,
|
|
208
|
+
message: ErrorMessages[code] || "\u672A\u77E5\u9519\u8BEF",
|
|
209
|
+
details,
|
|
210
|
+
traceId,
|
|
211
|
+
timestamp: Date.now()
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function getHttpStatusFromErrorCode(code) {
|
|
215
|
+
if (code === 1002 /* UNAUTHORIZED */) return 401;
|
|
216
|
+
if (code === 1003 /* FORBIDDEN */) return 403;
|
|
217
|
+
if (code === 1004 /* NOT_FOUND */) return 404;
|
|
218
|
+
if (code === 1005 /* RATE_LIMITED */) return 429;
|
|
219
|
+
if (code === 1009 /* TIMEOUT */) return 408;
|
|
220
|
+
if (code === 1008 /* SERVICE_UNAVAILABLE */) return 503;
|
|
221
|
+
const numericCode = Number(code);
|
|
222
|
+
if (numericCode >= 1e3 && numericCode < 2e3) return 400;
|
|
223
|
+
if (numericCode >= 2e3 && numericCode < 3e3) return 400;
|
|
224
|
+
if (numericCode >= 3e3 && numericCode < 4e3) return 400;
|
|
225
|
+
if (numericCode >= 4e3 && numericCode < 5e3) return 404;
|
|
226
|
+
if (numericCode >= 5e3 && numericCode < 6e3) return 404;
|
|
227
|
+
if (numericCode >= 6e3 && numericCode < 7e3) return 400;
|
|
228
|
+
if (numericCode >= 7e3 && numericCode < 8e3) return 400;
|
|
229
|
+
if (numericCode >= 8e3 && numericCode < 9e3) return 400;
|
|
230
|
+
return 500;
|
|
231
|
+
}
|
|
232
|
+
function isRetryableError(code) {
|
|
233
|
+
return [
|
|
234
|
+
1009 /* TIMEOUT */,
|
|
235
|
+
1008 /* SERVICE_UNAVAILABLE */,
|
|
236
|
+
3005 /* QUERY_TIMEOUT */,
|
|
237
|
+
4006 /* COMPONENT_LOAD_FAILED */
|
|
238
|
+
].includes(code);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// src/page/index.ts
|
|
242
|
+
var PublishStatus = /* @__PURE__ */ ((PublishStatus2) => {
|
|
243
|
+
PublishStatus2["PENDING"] = "pending";
|
|
244
|
+
PublishStatus2["PUBLISHING"] = "publishing";
|
|
245
|
+
PublishStatus2["SUCCESS"] = "success";
|
|
246
|
+
PublishStatus2["FAILED"] = "failed";
|
|
247
|
+
PublishStatus2["ROLLBACK"] = "rollback";
|
|
248
|
+
return PublishStatus2;
|
|
249
|
+
})(PublishStatus || {});
|
|
250
|
+
|
|
251
|
+
// src/component/index.ts
|
|
252
|
+
var COMPONENT_CATEGORIES = [
|
|
253
|
+
"basic",
|
|
254
|
+
"form",
|
|
255
|
+
"layout",
|
|
256
|
+
"navigation",
|
|
257
|
+
"feedback",
|
|
258
|
+
"display",
|
|
259
|
+
"data",
|
|
260
|
+
"business",
|
|
261
|
+
"chart",
|
|
262
|
+
"other"
|
|
263
|
+
];
|
|
264
|
+
|
|
265
|
+
// src/expression/index.ts
|
|
266
|
+
var BUILTIN_FUNCTIONS = [
|
|
267
|
+
// 字符串函数
|
|
268
|
+
{
|
|
269
|
+
name: "len",
|
|
270
|
+
description: "\u83B7\u53D6\u5B57\u7B26\u4E32\u6216\u6570\u7EC4\u957F\u5EA6",
|
|
271
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
272
|
+
returnType: "number",
|
|
273
|
+
examples: ['len("hello")', "len([1,2,3])"]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: "trim",
|
|
277
|
+
description: "\u53BB\u9664\u5B57\u7B26\u4E32\u9996\u5C3E\u7A7A\u683C",
|
|
278
|
+
params: [{ name: "str", type: "string", required: true }],
|
|
279
|
+
returnType: "string",
|
|
280
|
+
examples: ['trim(" hello ")']
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "upper",
|
|
284
|
+
description: "\u8F6C\u4E3A\u5927\u5199",
|
|
285
|
+
params: [{ name: "str", type: "string", required: true }],
|
|
286
|
+
returnType: "string",
|
|
287
|
+
examples: ['upper("hello")']
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "lower",
|
|
291
|
+
description: "\u8F6C\u4E3A\u5C0F\u5199",
|
|
292
|
+
params: [{ name: "str", type: "string", required: true }],
|
|
293
|
+
returnType: "string",
|
|
294
|
+
examples: ['lower("HELLO")']
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "substr",
|
|
298
|
+
description: "\u622A\u53D6\u5B50\u5B57\u7B26\u4E32",
|
|
299
|
+
params: [
|
|
300
|
+
{ name: "str", type: "string", required: true },
|
|
301
|
+
{ name: "start", type: "number", required: true },
|
|
302
|
+
{ name: "length", type: "number", required: false }
|
|
303
|
+
],
|
|
304
|
+
returnType: "string",
|
|
305
|
+
examples: ['substr("hello", 0, 2)']
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: "concat",
|
|
309
|
+
description: "\u8FDE\u63A5\u5B57\u7B26\u4E32",
|
|
310
|
+
params: [
|
|
311
|
+
{ name: "values", type: "any", required: true, description: "\u53EF\u53D8\u53C2\u6570" }
|
|
312
|
+
],
|
|
313
|
+
returnType: "string",
|
|
314
|
+
examples: ['concat("a", "b", "c")']
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: "replace",
|
|
318
|
+
description: "\u66FF\u6362\u5B57\u7B26\u4E32",
|
|
319
|
+
params: [
|
|
320
|
+
{ name: "str", type: "string", required: true },
|
|
321
|
+
{ name: "search", type: "string", required: true },
|
|
322
|
+
{ name: "replacement", type: "string", required: true }
|
|
323
|
+
],
|
|
324
|
+
returnType: "string",
|
|
325
|
+
examples: ['replace("hello", "l", "x")']
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "split",
|
|
329
|
+
description: "\u5206\u5272\u5B57\u7B26\u4E32",
|
|
330
|
+
params: [
|
|
331
|
+
{ name: "str", type: "string", required: true },
|
|
332
|
+
{ name: "separator", type: "string", required: true }
|
|
333
|
+
],
|
|
334
|
+
returnType: "array",
|
|
335
|
+
examples: ['split("a,b,c", ",")']
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "join",
|
|
339
|
+
description: "\u8FDE\u63A5\u6570\u7EC4\u4E3A\u5B57\u7B26\u4E32",
|
|
340
|
+
params: [
|
|
341
|
+
{ name: "arr", type: "array", required: true },
|
|
342
|
+
{ name: "separator", type: "string", required: false, defaultValue: "," }
|
|
343
|
+
],
|
|
344
|
+
returnType: "string",
|
|
345
|
+
examples: ['join(["a","b","c"], "-")']
|
|
346
|
+
},
|
|
347
|
+
// 数字函数
|
|
348
|
+
{
|
|
349
|
+
name: "toNumber",
|
|
350
|
+
description: "\u8F6C\u4E3A\u6570\u5B57",
|
|
351
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
352
|
+
returnType: "number",
|
|
353
|
+
examples: ['toNumber("123")']
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "toString",
|
|
357
|
+
description: "\u8F6C\u4E3A\u5B57\u7B26\u4E32",
|
|
358
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
359
|
+
returnType: "string",
|
|
360
|
+
examples: ["toString(123)"]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "round",
|
|
364
|
+
description: "\u56DB\u820D\u4E94\u5165",
|
|
365
|
+
params: [
|
|
366
|
+
{ name: "value", type: "number", required: true },
|
|
367
|
+
{ name: "decimals", type: "number", required: false, defaultValue: 0 }
|
|
368
|
+
],
|
|
369
|
+
returnType: "number",
|
|
370
|
+
examples: ["round(3.14159, 2)"]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: "floor",
|
|
374
|
+
description: "\u5411\u4E0B\u53D6\u6574",
|
|
375
|
+
params: [{ name: "value", type: "number", required: true }],
|
|
376
|
+
returnType: "number",
|
|
377
|
+
examples: ["floor(3.7)"]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "ceil",
|
|
381
|
+
description: "\u5411\u4E0A\u53D6\u6574",
|
|
382
|
+
params: [{ name: "value", type: "number", required: true }],
|
|
383
|
+
returnType: "number",
|
|
384
|
+
examples: ["ceil(3.2)"]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "abs",
|
|
388
|
+
description: "\u7EDD\u5BF9\u503C",
|
|
389
|
+
params: [{ name: "value", type: "number", required: true }],
|
|
390
|
+
returnType: "number",
|
|
391
|
+
examples: ["abs(-5)"]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "min",
|
|
395
|
+
description: "\u6700\u5C0F\u503C",
|
|
396
|
+
params: [
|
|
397
|
+
{ name: "values", type: "number", required: true, description: "\u53EF\u53D8\u53C2\u6570" }
|
|
398
|
+
],
|
|
399
|
+
returnType: "number",
|
|
400
|
+
examples: ["min(1, 2, 3)"]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: "max",
|
|
404
|
+
description: "\u6700\u5927\u503C",
|
|
405
|
+
params: [
|
|
406
|
+
{ name: "values", type: "number", required: true, description: "\u53EF\u53D8\u53C2\u6570" }
|
|
407
|
+
],
|
|
408
|
+
returnType: "number",
|
|
409
|
+
examples: ["max(1, 2, 3)"]
|
|
410
|
+
},
|
|
411
|
+
// 日期函数
|
|
412
|
+
{
|
|
413
|
+
name: "now",
|
|
414
|
+
description: "\u5F53\u524D\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09",
|
|
415
|
+
params: [],
|
|
416
|
+
returnType: "number",
|
|
417
|
+
examples: ["now()"]
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "dateFormat",
|
|
421
|
+
description: "\u683C\u5F0F\u5316\u65E5\u671F",
|
|
422
|
+
params: [
|
|
423
|
+
{ name: "timestamp", type: "number", required: true },
|
|
424
|
+
{ name: "format", type: "string", required: false, defaultValue: "YYYY-MM-DD" }
|
|
425
|
+
],
|
|
426
|
+
returnType: "string",
|
|
427
|
+
examples: ['dateFormat(now(), "YYYY-MM-DD HH:mm:ss")']
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "dateParse",
|
|
431
|
+
description: "\u89E3\u6790\u65E5\u671F\u5B57\u7B26\u4E32",
|
|
432
|
+
params: [
|
|
433
|
+
{ name: "dateStr", type: "string", required: true },
|
|
434
|
+
{ name: "format", type: "string", required: false }
|
|
435
|
+
],
|
|
436
|
+
returnType: "number",
|
|
437
|
+
examples: ['dateParse("2024-01-01")']
|
|
438
|
+
},
|
|
439
|
+
// 数组函数
|
|
440
|
+
{
|
|
441
|
+
name: "first",
|
|
442
|
+
description: "\u83B7\u53D6\u6570\u7EC4\u7B2C\u4E00\u4E2A\u5143\u7D20",
|
|
443
|
+
params: [{ name: "arr", type: "array", required: true }],
|
|
444
|
+
returnType: "any",
|
|
445
|
+
examples: ["first([1,2,3])"]
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: "last",
|
|
449
|
+
description: "\u83B7\u53D6\u6570\u7EC4\u6700\u540E\u4E00\u4E2A\u5143\u7D20",
|
|
450
|
+
params: [{ name: "arr", type: "array", required: true }],
|
|
451
|
+
returnType: "any",
|
|
452
|
+
examples: ["last([1,2,3])"]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "includes",
|
|
456
|
+
description: "\u68C0\u67E5\u6570\u7EC4\u662F\u5426\u5305\u542B\u5143\u7D20",
|
|
457
|
+
params: [
|
|
458
|
+
{ name: "arr", type: "array", required: true },
|
|
459
|
+
{ name: "value", type: "any", required: true }
|
|
460
|
+
],
|
|
461
|
+
returnType: "boolean",
|
|
462
|
+
examples: ["includes([1,2,3], 2)"]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: "slice",
|
|
466
|
+
description: "\u622A\u53D6\u6570\u7EC4",
|
|
467
|
+
params: [
|
|
468
|
+
{ name: "arr", type: "array", required: true },
|
|
469
|
+
{ name: "start", type: "number", required: true },
|
|
470
|
+
{ name: "end", type: "number", required: false }
|
|
471
|
+
],
|
|
472
|
+
returnType: "array",
|
|
473
|
+
examples: ["slice([1,2,3,4], 1, 3)"]
|
|
474
|
+
},
|
|
475
|
+
// 条件函数
|
|
476
|
+
{
|
|
477
|
+
name: "default",
|
|
478
|
+
description: "\u63D0\u4F9B\u9ED8\u8BA4\u503C",
|
|
479
|
+
params: [
|
|
480
|
+
{ name: "value", type: "any", required: true },
|
|
481
|
+
{ name: "defaultValue", type: "any", required: true }
|
|
482
|
+
],
|
|
483
|
+
returnType: "any",
|
|
484
|
+
examples: ['default(null, "fallback")']
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
name: "ifElse",
|
|
488
|
+
description: "\u6761\u4EF6\u5224\u65AD",
|
|
489
|
+
params: [
|
|
490
|
+
{ name: "condition", type: "boolean", required: true },
|
|
491
|
+
{ name: "trueValue", type: "any", required: true },
|
|
492
|
+
{ name: "falseValue", type: "any", required: true }
|
|
493
|
+
],
|
|
494
|
+
returnType: "any",
|
|
495
|
+
examples: ['ifElse(age > 18, "\u6210\u5E74", "\u672A\u6210\u5E74")']
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
name: "isEmpty",
|
|
499
|
+
description: "\u68C0\u67E5\u662F\u5426\u4E3A\u7A7A",
|
|
500
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
501
|
+
returnType: "boolean",
|
|
502
|
+
examples: ['isEmpty("")', "isEmpty([])"]
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: "isNull",
|
|
506
|
+
description: "\u68C0\u67E5\u662F\u5426\u4E3A null \u6216 undefined",
|
|
507
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
508
|
+
returnType: "boolean",
|
|
509
|
+
examples: ["isNull(null)"]
|
|
510
|
+
},
|
|
511
|
+
// JSON 函数
|
|
512
|
+
{
|
|
513
|
+
name: "jsonParse",
|
|
514
|
+
description: "\u89E3\u6790 JSON \u5B57\u7B26\u4E32",
|
|
515
|
+
params: [{ name: "str", type: "string", required: true }],
|
|
516
|
+
returnType: "any",
|
|
517
|
+
examples: [`jsonParse('{"a":1}')`]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: "jsonStringify",
|
|
521
|
+
description: "\u5E8F\u5217\u5316\u4E3A JSON",
|
|
522
|
+
params: [{ name: "value", type: "any", required: true }],
|
|
523
|
+
returnType: "string",
|
|
524
|
+
examples: ["jsonStringify({a:1})"]
|
|
525
|
+
}
|
|
526
|
+
];
|
|
527
|
+
var BUILTIN_FUNCTION_NAMES = new Set(BUILTIN_FUNCTIONS.map((f) => f.name));
|
|
528
|
+
var ALLOWED_ROOT_VARIABLES = [
|
|
529
|
+
"state",
|
|
530
|
+
"query",
|
|
531
|
+
"context",
|
|
532
|
+
"event",
|
|
533
|
+
"item",
|
|
534
|
+
"index"
|
|
535
|
+
];
|
|
536
|
+
function isExpressionBinding(value) {
|
|
537
|
+
return value !== null && typeof value === "object" && value.__isExpression === true && typeof value.expression === "string";
|
|
538
|
+
}
|
|
539
|
+
function createExpressionBinding(expression, fallback) {
|
|
540
|
+
return {
|
|
541
|
+
__isExpression: true,
|
|
542
|
+
expression,
|
|
543
|
+
fallback
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// src/migrations/index.ts
|
|
548
|
+
var SCHEMA_VERSIONS = ["1.0.0", "1.1.0", "2.0.0"];
|
|
549
|
+
var CURRENT_SCHEMA_VERSION = "1.0.0";
|
|
550
|
+
var migrations = [];
|
|
551
|
+
function registerMigration(migration) {
|
|
552
|
+
const exists = migrations.some(
|
|
553
|
+
(m) => m.from === migration.from && m.to === migration.to
|
|
554
|
+
);
|
|
555
|
+
if (exists) {
|
|
556
|
+
throw new Error(`Migration from ${migration.from} to ${migration.to} already exists`);
|
|
557
|
+
}
|
|
558
|
+
migrations.push(migration);
|
|
559
|
+
}
|
|
560
|
+
function getAllMigrations() {
|
|
561
|
+
return [...migrations];
|
|
562
|
+
}
|
|
563
|
+
function findMigrationPath(from, to) {
|
|
564
|
+
const path = [];
|
|
565
|
+
let current = from;
|
|
566
|
+
while (current !== to) {
|
|
567
|
+
const nextMigration = migrations.find((m) => m.from === current);
|
|
568
|
+
if (!nextMigration) {
|
|
569
|
+
throw new Error(`No migration path from ${current} to ${to}`);
|
|
570
|
+
}
|
|
571
|
+
path.push(nextMigration);
|
|
572
|
+
current = nextMigration.to;
|
|
573
|
+
if (path.length > 100) {
|
|
574
|
+
throw new Error("Migration path too long, possible circular dependency");
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return path;
|
|
578
|
+
}
|
|
579
|
+
function migratePageSchema(data, targetVersion) {
|
|
580
|
+
const fromVersion = data.schemaVersion || "1.0.0";
|
|
581
|
+
const toVersion = targetVersion || CURRENT_SCHEMA_VERSION;
|
|
582
|
+
if (fromVersion === toVersion) {
|
|
583
|
+
return {
|
|
584
|
+
success: true,
|
|
585
|
+
data,
|
|
586
|
+
fromVersion,
|
|
587
|
+
toVersion,
|
|
588
|
+
appliedMigrations: []
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
try {
|
|
592
|
+
const path = findMigrationPath(fromVersion, toVersion);
|
|
593
|
+
let result = { ...data };
|
|
594
|
+
const appliedMigrations = [];
|
|
595
|
+
for (const migration of path) {
|
|
596
|
+
result = migration.migrate(result);
|
|
597
|
+
result.schemaVersion = migration.to;
|
|
598
|
+
appliedMigrations.push(`${migration.from} -> ${migration.to}`);
|
|
599
|
+
}
|
|
600
|
+
return {
|
|
601
|
+
success: true,
|
|
602
|
+
data: result,
|
|
603
|
+
fromVersion,
|
|
604
|
+
toVersion,
|
|
605
|
+
appliedMigrations
|
|
606
|
+
};
|
|
607
|
+
} catch (error) {
|
|
608
|
+
return {
|
|
609
|
+
success: false,
|
|
610
|
+
fromVersion,
|
|
611
|
+
toVersion,
|
|
612
|
+
appliedMigrations: [],
|
|
613
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
function needsMigration(data, targetVersion) {
|
|
618
|
+
const currentVersion = data.schemaVersion || "1.0.0";
|
|
619
|
+
const target = targetVersion || CURRENT_SCHEMA_VERSION;
|
|
620
|
+
return currentVersion !== target;
|
|
621
|
+
}
|
|
622
|
+
function getVersionInfo(version) {
|
|
623
|
+
const [major, minor, patch] = version.split(".").map(Number);
|
|
624
|
+
return { major, minor, patch };
|
|
625
|
+
}
|
|
626
|
+
function compareVersions(a, b) {
|
|
627
|
+
const va = getVersionInfo(a);
|
|
628
|
+
const vb = getVersionInfo(b);
|
|
629
|
+
if (va.major !== vb.major) return va.major < vb.major ? -1 : 1;
|
|
630
|
+
if (va.minor !== vb.minor) return va.minor < vb.minor ? -1 : 1;
|
|
631
|
+
if (va.patch !== vb.patch) return va.patch < vb.patch ? -1 : 1;
|
|
632
|
+
return 0;
|
|
633
|
+
}
|
|
634
|
+
registerMigration({
|
|
635
|
+
from: "1.0.0",
|
|
636
|
+
to: "1.1.0",
|
|
637
|
+
description: "\u6DFB\u52A0 Definition \u7248\u672C\u7ED1\u5B9A\u5B57\u6BB5",
|
|
638
|
+
migrate: (data) => {
|
|
639
|
+
return {
|
|
640
|
+
...data,
|
|
641
|
+
actionDefVersionIds: data.actionDefVersionIds || [],
|
|
642
|
+
dataQueryVersionIds: data.dataQueryVersionIds || []
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
registerMigration({
|
|
647
|
+
from: "1.1.0",
|
|
648
|
+
to: "2.0.0",
|
|
649
|
+
description: "\u91CD\u6784\u7EC4\u4EF6\u4E8B\u4EF6\u7ED3\u6784",
|
|
650
|
+
breaking: true,
|
|
651
|
+
migrate: (data) => {
|
|
652
|
+
return {
|
|
653
|
+
...data,
|
|
654
|
+
components: data.components.map((component) => ({
|
|
655
|
+
...component,
|
|
656
|
+
// 示例:将 events 数组中的 actions 结构标准化
|
|
657
|
+
events: component.events?.map((event) => ({
|
|
658
|
+
...event,
|
|
659
|
+
// 确保 enabled 字段存在
|
|
660
|
+
enabled: event.enabled ?? true
|
|
661
|
+
}))
|
|
662
|
+
}))
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
667
|
+
0 && (module.exports = {
|
|
668
|
+
ACTION_SPEC_VERSION,
|
|
669
|
+
ALLOWED_ROOT_VARIABLES,
|
|
670
|
+
BUILTIN_FUNCTIONS,
|
|
671
|
+
BUILTIN_FUNCTION_NAMES,
|
|
672
|
+
COMPONENT_CATEGORIES,
|
|
673
|
+
COMPONENT_META_SCHEMA_VERSION,
|
|
674
|
+
CURRENT_SCHEMA_VERSION,
|
|
675
|
+
DATA_QUERY_SPEC_VERSION,
|
|
676
|
+
ErrorCode,
|
|
677
|
+
ErrorCodeCategory,
|
|
678
|
+
ErrorMessages,
|
|
679
|
+
PAGE_SCHEMA_VERSION,
|
|
680
|
+
PublishStatus,
|
|
681
|
+
SCHEMA_VERSIONS,
|
|
682
|
+
compareVersions,
|
|
683
|
+
createDjvlcError,
|
|
684
|
+
createExpressionBinding,
|
|
685
|
+
findMigrationPath,
|
|
686
|
+
getAllMigrations,
|
|
687
|
+
getContractsVersion,
|
|
688
|
+
getHttpStatusFromErrorCode,
|
|
689
|
+
getVersionInfo,
|
|
690
|
+
isExpressionBinding,
|
|
691
|
+
isRetryableError,
|
|
692
|
+
isVersionCompatible,
|
|
693
|
+
migratePageSchema,
|
|
694
|
+
needsMigration,
|
|
695
|
+
registerMigration
|
|
696
|
+
});
|
|
697
|
+
//# sourceMappingURL=index.js.map
|