@webiny/db 0.0.0-mt-3 → 0.0.0-unstable.2af142b57e
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/index.d.ts +20 -15
- package/index.js +24 -60
- package/index.js.map +1 -0
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* TODO Remove when moved all packages to standalone storage opts.
|
|
3
|
+
*/
|
|
4
|
+
interface KeyField {
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Key {
|
|
2
8
|
primary?: boolean;
|
|
3
9
|
unique?: boolean;
|
|
4
10
|
name: string;
|
|
5
|
-
fields:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
11
|
+
fields: KeyField[];
|
|
12
|
+
}
|
|
13
|
+
export interface ArgsBatch {
|
|
14
|
+
instance: Batch;
|
|
15
|
+
operation: Operation;
|
|
16
|
+
}
|
|
17
|
+
export interface Args {
|
|
18
|
+
__batch?: ArgsBatch;
|
|
14
19
|
table?: string;
|
|
15
20
|
meta?: boolean;
|
|
16
21
|
limit?: number;
|
|
@@ -18,7 +23,7 @@ export declare type Args = {
|
|
|
18
23
|
data?: Record<string, any>;
|
|
19
24
|
query?: Record<string, any>;
|
|
20
25
|
keys?: Key[];
|
|
21
|
-
}
|
|
26
|
+
}
|
|
22
27
|
export declare type Result<T = any> = [T, Record<string, any>];
|
|
23
28
|
export interface DbDriver {
|
|
24
29
|
create: (args: Args) => Promise<Result<true>>;
|
|
@@ -51,9 +56,9 @@ declare class Db {
|
|
|
51
56
|
read<T = Record<string, any>>(args: Args): Promise<Result<T[]>>;
|
|
52
57
|
update(args: Args): Promise<Result<true>>;
|
|
53
58
|
delete(args: Args): Promise<Result<true>>;
|
|
54
|
-
createLog(operation:
|
|
55
|
-
readLogs<T = Record<string, any>>(): Promise<Result<T[]
|
|
56
|
-
batch<T0 = any, T1 = any, T2 = any, T3 = any, T4 = any, T5 = any, T6 = any, T7 = any, T8 = any, T9 = any>(): Batch
|
|
59
|
+
createLog(operation: string, args: Args): Promise<Result<true> | null>;
|
|
60
|
+
readLogs<T = Record<string, any>>(): Promise<Result<T[]> | null>;
|
|
61
|
+
batch<T0 = any, T1 = any, T2 = any, T3 = any, T4 = any, T5 = any, T6 = any, T7 = any, T8 = any, T9 = any>(): Batch;
|
|
57
62
|
}
|
|
58
63
|
declare class Batch<T0 = any, T1 = any, T2 = any, T3 = any, T4 = any, T5 = any, T6 = any, T7 = any, T8 = any, T9 = any> {
|
|
59
64
|
db: Db;
|
|
@@ -61,7 +66,7 @@ declare class Batch<T0 = any, T1 = any, T2 = any, T3 = any, T4 = any, T5 = any,
|
|
|
61
66
|
id: string;
|
|
62
67
|
meta: Record<string, any>;
|
|
63
68
|
operations: Operation[];
|
|
64
|
-
constructor(db:
|
|
69
|
+
constructor(db: Db);
|
|
65
70
|
push(...operations: Operation[]): this;
|
|
66
71
|
create(...args: Args[]): this;
|
|
67
72
|
read(...args: Args[]): this;
|
package/index.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Db = exports.Batch = void 0;
|
|
9
|
-
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
10
|
+
/**
|
|
11
|
+
* TODO Remove when moved all packages to standalone storage opts.
|
|
12
|
+
*/
|
|
15
13
|
|
|
16
14
|
// Generates a short and sortable ID, e.g. "1607677774994.tfz58m".
|
|
17
15
|
const shortId = () => {
|
|
18
16
|
const time = new Date().getTime();
|
|
19
17
|
const uniqueId = Math.random().toString(36).slice(-6);
|
|
20
18
|
return `${time}.${uniqueId}`;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
};
|
|
20
|
+
// Picks necessary data from received args, ready to be stored in the log table.
|
|
24
21
|
const getCreateLogData = args => {
|
|
25
22
|
const {
|
|
26
23
|
table,
|
|
@@ -31,7 +28,7 @@ const getCreateLogData = args => {
|
|
|
31
28
|
query,
|
|
32
29
|
keys
|
|
33
30
|
} = args;
|
|
34
|
-
|
|
31
|
+
return {
|
|
35
32
|
table,
|
|
36
33
|
meta,
|
|
37
34
|
limit,
|
|
@@ -39,19 +36,12 @@ const getCreateLogData = args => {
|
|
|
39
36
|
data,
|
|
40
37
|
query,
|
|
41
38
|
keys,
|
|
42
|
-
batch:
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
if (args.__batch) {
|
|
46
|
-
logData.batch = {
|
|
39
|
+
batch: args.__batch ? {
|
|
47
40
|
id: args.__batch.instance.id,
|
|
48
41
|
type: args.__batch.instance.type
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return logData;
|
|
42
|
+
} : null
|
|
43
|
+
};
|
|
53
44
|
};
|
|
54
|
-
|
|
55
45
|
class Db {
|
|
56
46
|
constructor({
|
|
57
47
|
driver,
|
|
@@ -62,52 +52,44 @@ class Db {
|
|
|
62
52
|
(0, _defineProperty2.default)(this, "table", void 0);
|
|
63
53
|
(0, _defineProperty2.default)(this, "logTable", void 0);
|
|
64
54
|
this.driver = driver;
|
|
55
|
+
// @ts-ignore
|
|
65
56
|
this.table = table;
|
|
66
57
|
this.logTable = logTable;
|
|
67
58
|
}
|
|
68
|
-
|
|
69
59
|
async create(args) {
|
|
70
|
-
const createArgs =
|
|
60
|
+
const createArgs = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
71
61
|
table: args.table || this.table
|
|
72
62
|
});
|
|
73
|
-
|
|
74
63
|
await this.createLog("create", createArgs);
|
|
75
64
|
return this.driver.create(createArgs);
|
|
76
65
|
}
|
|
77
|
-
|
|
78
66
|
async read(args) {
|
|
79
|
-
const readArgs =
|
|
67
|
+
const readArgs = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
80
68
|
table: args.table || this.table
|
|
81
69
|
});
|
|
82
|
-
|
|
83
70
|
await this.createLog("read", readArgs);
|
|
84
71
|
return this.driver.read(readArgs);
|
|
85
72
|
}
|
|
86
|
-
|
|
87
73
|
async update(args) {
|
|
88
|
-
const updateArgs =
|
|
74
|
+
const updateArgs = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
89
75
|
table: args.table || this.table
|
|
90
76
|
});
|
|
91
|
-
|
|
92
77
|
await this.createLog("update", updateArgs);
|
|
93
78
|
return this.driver.update(updateArgs);
|
|
94
79
|
}
|
|
95
|
-
|
|
96
80
|
async delete(args) {
|
|
97
|
-
const deleteArgs =
|
|
81
|
+
const deleteArgs = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
98
82
|
table: args.table || this.table
|
|
99
83
|
});
|
|
100
|
-
|
|
101
84
|
await this.createLog("delete", deleteArgs);
|
|
102
85
|
return this.driver.delete(deleteArgs);
|
|
103
|
-
}
|
|
104
|
-
|
|
86
|
+
}
|
|
105
87
|
|
|
88
|
+
// Logging functions.
|
|
106
89
|
async createLog(operation, args) {
|
|
107
90
|
if (!this.logTable) {
|
|
108
|
-
return;
|
|
91
|
+
return null;
|
|
109
92
|
}
|
|
110
|
-
|
|
111
93
|
const data = getCreateLogData(args);
|
|
112
94
|
return this.driver.createLog({
|
|
113
95
|
operation,
|
|
@@ -116,25 +98,19 @@ class Db {
|
|
|
116
98
|
id: shortId()
|
|
117
99
|
});
|
|
118
100
|
}
|
|
119
|
-
|
|
120
101
|
async readLogs() {
|
|
121
102
|
if (!this.logTable) {
|
|
122
|
-
return;
|
|
103
|
+
return null;
|
|
123
104
|
}
|
|
124
|
-
|
|
125
105
|
return this.driver.readLogs({
|
|
126
106
|
table: this.logTable
|
|
127
107
|
});
|
|
128
108
|
}
|
|
129
|
-
|
|
130
109
|
batch() {
|
|
131
110
|
return new Batch(this);
|
|
132
111
|
}
|
|
133
|
-
|
|
134
112
|
}
|
|
135
|
-
|
|
136
113
|
exports.Db = Db;
|
|
137
|
-
|
|
138
114
|
class Batch {
|
|
139
115
|
constructor(db) {
|
|
140
116
|
(0, _defineProperty2.default)(this, "db", void 0);
|
|
@@ -148,65 +124,53 @@ class Batch {
|
|
|
148
124
|
this.meta = {};
|
|
149
125
|
this.operations = [];
|
|
150
126
|
}
|
|
151
|
-
|
|
152
127
|
push(...operations) {
|
|
153
128
|
for (let i = 0; i < operations.length; i++) {
|
|
154
129
|
const item = operations[i];
|
|
155
130
|
this.operations.push(item);
|
|
156
131
|
}
|
|
157
|
-
|
|
158
132
|
return this;
|
|
159
133
|
}
|
|
160
|
-
|
|
161
134
|
create(...args) {
|
|
162
135
|
for (let i = 0; i < args.length; i++) {
|
|
163
136
|
this.push(["create", args[i]]);
|
|
164
137
|
}
|
|
165
|
-
|
|
166
138
|
return this;
|
|
167
139
|
}
|
|
168
|
-
|
|
169
140
|
read(...args) {
|
|
170
141
|
for (let i = 0; i < args.length; i++) {
|
|
171
142
|
this.push(["read", args[i]]);
|
|
172
143
|
}
|
|
173
|
-
|
|
174
144
|
return this;
|
|
175
145
|
}
|
|
176
|
-
|
|
177
146
|
update(...args) {
|
|
178
147
|
for (let i = 0; i < args.length; i++) {
|
|
179
148
|
this.push(["update", args[i]]);
|
|
180
149
|
}
|
|
181
|
-
|
|
182
150
|
return this;
|
|
183
151
|
}
|
|
184
|
-
|
|
185
152
|
delete(...args) {
|
|
186
153
|
for (let i = 0; i < args.length; i++) {
|
|
187
154
|
this.push(["delete", args[i]]);
|
|
188
155
|
}
|
|
189
|
-
|
|
190
156
|
return this;
|
|
191
157
|
}
|
|
192
|
-
|
|
193
158
|
async execute() {
|
|
159
|
+
/**
|
|
160
|
+
* TODO: figure out which exact type to use instead of any.
|
|
161
|
+
*/
|
|
194
162
|
const promises = [];
|
|
195
|
-
|
|
196
163
|
for (let i = 0; i < this.operations.length; i++) {
|
|
197
164
|
const [operation, args] = this.operations[i];
|
|
198
|
-
promises.push(this.db[operation](
|
|
165
|
+
promises.push(this.db[operation]((0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
199
166
|
__batch: {
|
|
200
167
|
instance: this,
|
|
201
168
|
operation: this.operations[i]
|
|
202
169
|
}
|
|
203
170
|
})));
|
|
204
171
|
}
|
|
205
|
-
|
|
206
172
|
const result = Promise.all(promises);
|
|
207
173
|
return result;
|
|
208
174
|
}
|
|
209
|
-
|
|
210
175
|
}
|
|
211
|
-
|
|
212
176
|
exports.Batch = Batch;
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["shortId","time","Date","getTime","uniqueId","Math","random","toString","slice","getCreateLogData","args","table","meta","limit","sort","data","query","keys","batch","__batch","id","instance","type","Db","constructor","driver","logTable","create","createArgs","createLog","read","readArgs","update","updateArgs","delete","deleteArgs","operation","readLogs","Batch","db","operations","push","i","length","item","execute","promises","result","Promise","all"],"sources":["index.ts"],"sourcesContent":["/**\n * TODO Remove when moved all packages to standalone storage opts.\n */\ninterface KeyField {\n name: string;\n}\n\nexport interface Key {\n primary?: boolean;\n unique?: boolean;\n name: string;\n fields: KeyField[];\n}\n\nexport interface ArgsBatch {\n instance: Batch;\n operation: Operation;\n}\nexport interface Args {\n __batch?: ArgsBatch;\n table?: string;\n meta?: boolean;\n limit?: number;\n sort?: Record<string, 1 | -1>;\n data?: Record<string, any>;\n query?: Record<string, any>;\n keys?: Key[];\n}\n\nexport type Result<T = any> = [T, Record<string, any>];\n\nexport interface DbDriver {\n create: (args: Args) => Promise<Result<true>>;\n read: <T = Record<string, any>>(args: Args) => Promise<Result<T[]>>;\n update: (args: Args) => Promise<Result<true>>;\n delete: (args: Args) => Promise<Result<true>>;\n\n // Logging functions.\n createLog: (args: {\n operation: string;\n data: Args;\n table: string;\n id: string;\n }) => Promise<Result<true>>;\n readLogs: <T = Record<string, any>>(args: { table: string }) => Promise<Result<T[]>>;\n}\n\nexport type OperationType = \"create\" | \"read\" | \"update\" | \"delete\";\nexport type Operation = [OperationType, Args];\n\nexport type ConstructorArgs = {\n driver: DbDriver;\n table?: string;\n logTable?: string;\n};\n\n// Generates a short and sortable ID, e.g. \"1607677774994.tfz58m\".\nconst shortId = () => {\n const time = new Date().getTime();\n const uniqueId = Math.random().toString(36).slice(-6);\n\n return `${time}.${uniqueId}`;\n};\n\ninterface LogDataBatch {\n id: string;\n type: string;\n}\ninterface LogData\n extends Pick<Args, \"table\" | \"meta\" | \"limit\" | \"sort\" | \"data\" | \"query\" | \"keys\"> {\n batch: LogDataBatch | null;\n}\n\n// Picks necessary data from received args, ready to be stored in the log table.\nconst getCreateLogData = (args: Args): LogData => {\n const { table, meta, limit, sort, data, query, keys } = args;\n\n return {\n table,\n meta,\n limit,\n sort,\n data,\n query,\n keys,\n batch: args.__batch\n ? {\n id: args.__batch.instance.id,\n type: args.__batch.instance.type\n }\n : null\n };\n};\n\nclass Db {\n public driver: DbDriver;\n public table: string;\n public logTable?: string;\n\n constructor({ driver, table, logTable }: ConstructorArgs) {\n this.driver = driver;\n // @ts-ignore\n this.table = table;\n this.logTable = logTable;\n }\n\n public async create(args: Args): Promise<Result<true>> {\n const createArgs = { ...args, table: args.table || this.table };\n await this.createLog(\"create\", createArgs);\n return this.driver.create(createArgs);\n }\n\n public async read<T = Record<string, any>>(args: Args): Promise<Result<T[]>> {\n const readArgs = { ...args, table: args.table || this.table };\n await this.createLog(\"read\", readArgs);\n return this.driver.read(readArgs);\n }\n\n public async update(args: Args): Promise<Result<true>> {\n const updateArgs = { ...args, table: args.table || this.table };\n await this.createLog(\"update\", updateArgs);\n return this.driver.update(updateArgs);\n }\n\n public async delete(args: Args): Promise<Result<true>> {\n const deleteArgs = { ...args, table: args.table || this.table };\n await this.createLog(\"delete\", deleteArgs);\n return this.driver.delete(deleteArgs);\n }\n\n // Logging functions.\n public async createLog(operation: string, args: Args): Promise<Result<true> | null> {\n if (!this.logTable) {\n return null;\n }\n\n const data = getCreateLogData(args);\n return this.driver.createLog({ operation, data, table: this.logTable, id: shortId() });\n }\n\n public async readLogs<T = Record<string, any>>(): Promise<Result<T[]> | null> {\n if (!this.logTable) {\n return null;\n }\n\n return this.driver.readLogs({\n table: this.logTable\n });\n }\n\n public batch<\n T0 = any,\n T1 = any,\n T2 = any,\n T3 = any,\n T4 = any,\n T5 = any,\n T6 = any,\n T7 = any,\n T8 = any,\n T9 = any\n >(): Batch {\n return new Batch<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(this);\n }\n}\n\nclass Batch<\n T0 = any,\n T1 = any,\n T2 = any,\n T3 = any,\n T4 = any,\n T5 = any,\n T6 = any,\n T7 = any,\n T8 = any,\n T9 = any\n> {\n db: Db;\n type: \"batch\" | \"transaction\";\n id: string;\n meta: Record<string, any>;\n operations: Operation[];\n\n constructor(db: Db) {\n this.db = db;\n this.type = \"batch\";\n this.id = shortId();\n\n this.meta = {};\n this.operations = [];\n }\n\n push(...operations: Operation[]) {\n for (let i = 0; i < operations.length; i++) {\n const item = operations[i];\n this.operations.push(item);\n }\n return this;\n }\n\n create(...args: Args[]) {\n for (let i = 0; i < args.length; i++) {\n this.push([\"create\", args[i]]);\n }\n return this;\n }\n\n read(...args: Args[]) {\n for (let i = 0; i < args.length; i++) {\n this.push([\"read\", args[i]]);\n }\n return this;\n }\n\n update(...args: Args[]) {\n for (let i = 0; i < args.length; i++) {\n this.push([\"update\", args[i]]);\n }\n return this;\n }\n\n delete(...args: Args[]) {\n for (let i = 0; i < args.length; i++) {\n this.push([\"delete\", args[i]]);\n }\n return this;\n }\n\n async execute(): Promise<[T0?, T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?]> {\n /**\n * TODO: figure out which exact type to use instead of any.\n */\n const promises: Promise<any>[] = [];\n for (let i = 0; i < this.operations.length; i++) {\n const [operation, args] = this.operations[i];\n promises.push(\n this.db[operation]({\n ...args,\n __batch: {\n instance: this,\n operation: this.operations[i]\n }\n })\n );\n }\n\n const result = Promise.all(promises);\n\n return result as Promise<[T0?, T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?]>;\n }\n}\n\nexport { Batch, Db };\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;;AAsDA;AACA,MAAMA,OAAO,GAAG,MAAM;EAClB,MAAMC,IAAI,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;EACjC,MAAMC,QAAQ,GAAGC,IAAI,CAACC,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC;EAErD,OAAQ,GAAEP,IAAK,IAAGG,QAAS,EAAC;AAChC,CAAC;AAWD;AACA,MAAMK,gBAAgB,GAAIC,IAAU,IAAc;EAC9C,MAAM;IAAEC,KAAK;IAAEC,IAAI;IAAEC,KAAK;IAAEC,IAAI;IAAEC,IAAI;IAAEC,KAAK;IAAEC;EAAK,CAAC,GAAGP,IAAI;EAE5D,OAAO;IACHC,KAAK;IACLC,IAAI;IACJC,KAAK;IACL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AAC,EAAE,EAAE;MAClC,IAAI,CAACD,IAAI,CAAC,CAAC,QAAQ,EAAE/B,IAAI,CAACgC,CAAC,CAAC,CAAC,CAAC;IAClC;IACA,OAAO,IAAI;EACf;EAEA,MAAMG,OAAO,GAAgE;IACzE;AACR;AACA;IACQ,MAAMC,QAAwB,GAAG,EAAE;IACnC,KAAK,IAAIJ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACF,UAAU,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;MAC7C,MAAM,CAACN,SAAS,EAAE1B,IAAI,CAAC,GAAG,IAAI,CAAC8B,UAAU,CAACE,CAAC,CAAC;MAC5CI,QAAQ,CAACL,IAAI,CACT,IAAI,CAACF,EAAE,CAACH,SAAS,CAAC,6DACX1B,IAAI;QACPS,OAAO,EAAE;UACLE,QAAQ,EAAE,IAAI;UACde,SAAS,EAAE,IAAI,CAACI,UAAU,CAACE,CAAC;QAChC;MAAC,GACH,CACL;IACL;IAEA,MAAMK,MAAM,GAAGC,OAAO,CAACC,GAAG,CAACH,QAAQ,CAAC;IAEpC,OAAOC,MAAM;EACjB;AACJ;AAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/db",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-unstable.2af142b57e",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"directory": "dist"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@babel/cli": "^7.
|
|
17
|
-
"@babel/core": "^7.
|
|
18
|
-
"@webiny/cli": "^0.0.0-
|
|
19
|
-
"@webiny/project-utils": "^0.0.0-
|
|
16
|
+
"@babel/cli": "^7.19.3",
|
|
17
|
+
"@babel/core": "^7.19.3",
|
|
18
|
+
"@webiny/cli": "^0.0.0-unstable.2af142b57e",
|
|
19
|
+
"@webiny/project-utils": "^0.0.0-unstable.2af142b57e",
|
|
20
20
|
"rimraf": "^3.0.2",
|
|
21
|
-
"typescript": "
|
|
21
|
+
"typescript": "4.7.4"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "yarn webiny run build",
|
|
25
25
|
"watch": "yarn webiny run watch"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "2af142b57e7cdc433f5098b3b6d43ae6caa5d54e"
|
|
28
28
|
}
|