sonamu 0.4.11 → 0.4.12
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/bin/cli.js +51 -51
- package/dist/bin/cli.mjs +2 -2
- package/dist/{chunk-634GIW42.mjs → chunk-FKZK27YL.mjs} +2 -2
- package/dist/{chunk-GUKIIOZI.js → chunk-FYLFH3Q6.js} +100 -100
- package/dist/{chunk-QIHV5UYF.js → chunk-IEMX4VPN.js} +4 -4
- package/dist/{chunk-Z53BUBO4.js → chunk-INTZUNZ6.js} +7 -7
- package/dist/{chunk-PGPMEMK6.mjs → chunk-JQJTQQ7D.mjs} +2 -2
- package/dist/{chunk-GUV6I64Y.mjs → chunk-LNZTU4JC.mjs} +2 -2
- package/dist/{chunk-GUV6I64Y.mjs.map → chunk-LNZTU4JC.mjs.map} +1 -1
- package/dist/{chunk-A2BDNO7E.mjs → chunk-NPLUHS5L.mjs} +2 -2
- package/dist/{chunk-KX4762I3.js → chunk-ZLFDB43J.js} +2 -2
- package/dist/{chunk-KX4762I3.js.map → chunk-ZLFDB43J.js.map} +1 -1
- package/dist/database/drivers/knex/base-model.js +8 -8
- package/dist/database/drivers/knex/base-model.mjs +3 -3
- package/dist/database/drivers/kysely/base-model.js +9 -9
- package/dist/database/drivers/kysely/base-model.mjs +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/src/syncer/syncer.ts +1 -1
- /package/dist/{chunk-634GIW42.mjs.map → chunk-FKZK27YL.mjs.map} +0 -0
- /package/dist/{chunk-GUKIIOZI.js.map → chunk-FYLFH3Q6.js.map} +0 -0
- /package/dist/{chunk-QIHV5UYF.js.map → chunk-IEMX4VPN.js.map} +0 -0
- /package/dist/{chunk-Z53BUBO4.js.map → chunk-INTZUNZ6.js.map} +0 -0
- /package/dist/{chunk-PGPMEMK6.mjs.map → chunk-JQJTQQ7D.mjs.map} +0 -0
- /package/dist/{chunk-A2BDNO7E.mjs.map → chunk-NPLUHS5L.mjs.map} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkIEMX4VPNjs = require('../../../chunk-IEMX4VPN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkINTZUNZ6js = require('../../../chunk-INTZUNZ6.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkZLFDB43Jjs = require('../../../chunk-ZLFDB43J.js');
|
|
11
11
|
|
|
12
12
|
// src/database/drivers/knex/base-model.ts
|
|
13
|
-
var BaseModelClass = class extends
|
|
13
|
+
var BaseModelClass = class extends _chunkIEMX4VPNjs.BaseModelClassAbstract {
|
|
14
14
|
getDB(which) {
|
|
15
|
-
return
|
|
15
|
+
return _chunkZLFDB43Jjs.DB.getDB(which);
|
|
16
16
|
}
|
|
17
17
|
async destroy() {
|
|
18
|
-
return
|
|
18
|
+
return _chunkZLFDB43Jjs.DB.destroy();
|
|
19
19
|
}
|
|
20
20
|
getUpsertBuilder() {
|
|
21
|
-
return new (0,
|
|
21
|
+
return new (0, _chunkINTZUNZ6js.UpsertBuilder)();
|
|
22
22
|
}
|
|
23
23
|
applyJoins(clonedQb, joins) {
|
|
24
24
|
for (const join of joins) {
|
|
25
|
-
if (
|
|
25
|
+
if (_chunkZLFDB43Jjs.isCustomJoinClause.call(void 0, join)) {
|
|
26
26
|
if (join.join === "inner") {
|
|
27
27
|
clonedQb.qb = clonedQb.qb.innerJoin(
|
|
28
28
|
`${join.table} as ${join.as}`,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseModelClassAbstract
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-JQJTQQ7D.mjs";
|
|
4
4
|
import {
|
|
5
5
|
UpsertBuilder
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-NPLUHS5L.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DB,
|
|
9
9
|
isCustomJoinClause
|
|
10
|
-
} from "../../../chunk-
|
|
10
|
+
} from "../../../chunk-LNZTU4JC.mjs";
|
|
11
11
|
import "../../../chunk-PTFDTOJU.mjs";
|
|
12
12
|
|
|
13
13
|
// src/database/drivers/knex/base-model.ts
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkIEMX4VPNjs = require('../../../chunk-IEMX4VPN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkINTZUNZ6js = require('../../../chunk-INTZUNZ6.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZLFDB43Jjs = require('../../../chunk-ZLFDB43J.js');
|
|
12
12
|
|
|
13
13
|
// src/database/drivers/kysely/base-model.ts
|
|
14
14
|
var _inflection = require('inflection'); var _inflection2 = _interopRequireDefault(_inflection);
|
|
15
|
-
var BaseModelClass = class extends
|
|
15
|
+
var BaseModelClass = class extends _chunkIEMX4VPNjs.BaseModelClassAbstract {
|
|
16
16
|
getDB(which) {
|
|
17
|
-
return
|
|
17
|
+
return _chunkZLFDB43Jjs.DB.getDB(which);
|
|
18
18
|
}
|
|
19
19
|
async destroy() {
|
|
20
|
-
return
|
|
20
|
+
return _chunkZLFDB43Jjs.DB.destroy();
|
|
21
21
|
}
|
|
22
22
|
getUpsertBuilder() {
|
|
23
|
-
return new (0,
|
|
23
|
+
return new (0, _chunkINTZUNZ6js.UpsertBuilder)();
|
|
24
24
|
}
|
|
25
25
|
applyJoins(clonedQb, joins) {
|
|
26
26
|
for (const join of joins) {
|
|
27
|
-
if (
|
|
27
|
+
if (_chunkZLFDB43Jjs.isCustomJoinClause.call(void 0, join)) {
|
|
28
28
|
throw new Error("Custom join clause is not supported in Kysely");
|
|
29
29
|
}
|
|
30
30
|
if (join.join === "inner") {
|
|
@@ -48,7 +48,7 @@ var BaseModelClass = class extends _chunkQIHV5UYFjs.BaseModelClassAbstract {
|
|
|
48
48
|
if (!column) {
|
|
49
49
|
throw new Error("parseOrderBy: Invalid column");
|
|
50
50
|
}
|
|
51
|
-
const entity =
|
|
51
|
+
const entity = _chunkZLFDB43Jjs.EntityManager.get(_inflection2.default.classify(table));
|
|
52
52
|
if (!entity.props.find((p) => p.name === column)) {
|
|
53
53
|
throw new Error("parseOrderBy: \uD604\uC7AC \uC5D4\uD2F0\uD2F0\uC5D0 \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uCEEC\uB7FC\uC785\uB2C8\uB2E4: ");
|
|
54
54
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseModelClassAbstract
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-JQJTQQ7D.mjs";
|
|
4
4
|
import {
|
|
5
5
|
UpsertBuilder
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-NPLUHS5L.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DB,
|
|
9
9
|
EntityManager,
|
|
10
10
|
isCustomJoinClause
|
|
11
|
-
} from "../../../chunk-
|
|
11
|
+
} from "../../../chunk-LNZTU4JC.mjs";
|
|
12
12
|
import "../../../chunk-PTFDTOJU.mjs";
|
|
13
13
|
|
|
14
14
|
// src/database/drivers/kysely/base-model.ts
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkFYLFH3Q6js = require('./chunk-FYLFH3Q6.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkINTZUNZ6js = require('./chunk-INTZUNZ6.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -88,15 +88,15 @@ var _chunkZ53BUBO4js = require('./chunk-Z53BUBO4.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkZLFDB43Jjs = require('./chunk-ZLFDB43J.js');
|
|
92
92
|
|
|
93
93
|
// src/api/base-frame.ts
|
|
94
94
|
var BaseFrameClass = class {
|
|
95
95
|
getDB(which) {
|
|
96
|
-
return
|
|
96
|
+
return _chunkZLFDB43Jjs.DB.getDB(which);
|
|
97
97
|
}
|
|
98
98
|
getUpsertBuilder() {
|
|
99
|
-
return new (0,
|
|
99
|
+
return new (0, _chunkINTZUNZ6js.UpsertBuilder)();
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ var BaseFrameClass = class {
|
|
|
104
104
|
function setupErrorHandler(server) {
|
|
105
105
|
server.setErrorHandler((error, request, reply) => {
|
|
106
106
|
error.statusCode ??= 400;
|
|
107
|
-
if (
|
|
107
|
+
if (_chunkZLFDB43Jjs.isSoException.call(void 0, error) && error.payload && Array.isArray(error.payload)) {
|
|
108
108
|
const issues = error.payload;
|
|
109
109
|
const [issue] = issues;
|
|
110
110
|
const message = `${issue.message} (${issue.path.join("/")})`;
|
|
@@ -327,13 +327,13 @@ var i = {
|
|
|
327
327
|
function index(columns) {
|
|
328
328
|
return {
|
|
329
329
|
type: "index",
|
|
330
|
-
columns:
|
|
330
|
+
columns: _chunkZLFDB43Jjs.asArray.call(void 0, columns)
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function unique(columns) {
|
|
334
334
|
return {
|
|
335
335
|
type: "unique",
|
|
336
|
-
columns:
|
|
336
|
+
columns: _chunkZLFDB43Jjs.asArray.call(void 0, columns)
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
|
|
@@ -426,5 +426,5 @@ function unique(columns) {
|
|
|
426
426
|
|
|
427
427
|
|
|
428
428
|
|
|
429
|
-
exports.AlreadyProcessedException =
|
|
429
|
+
exports.AlreadyProcessedException = _chunkZLFDB43Jjs.AlreadyProcessedException; exports.ApiParamType = _chunkZLFDB43Jjs.ApiParamType; exports.BadRequestException = _chunkZLFDB43Jjs.BadRequestException; exports.BaseFrameClass = BaseFrameClass; exports.DB = _chunkZLFDB43Jjs.DB; exports.DBKnexClass = _chunkZLFDB43Jjs.DBKnexClass; exports.DBKyselyClass = _chunkZLFDB43Jjs.DBKyselyClass; exports.DuplicateRowException = _chunkZLFDB43Jjs.DuplicateRowException; exports.Entity = _chunkZLFDB43Jjs.Entity; exports.EntityManager = _chunkZLFDB43Jjs.EntityManager; exports.FixtureManager = _chunkFYLFH3Q6js.FixtureManager; exports.FixtureManagerClass = _chunkFYLFH3Q6js.FixtureManagerClass; exports.GenerateOptions = _chunkZLFDB43Jjs.GenerateOptions; exports.InternalServerErrorException = _chunkZLFDB43Jjs.InternalServerErrorException; exports.Migrator = _chunkFYLFH3Q6js.Migrator; exports.NotFoundException = _chunkZLFDB43Jjs.NotFoundException; exports.PathAndCode = _chunkZLFDB43Jjs.PathAndCode; exports.RenderingNode = _chunkZLFDB43Jjs.RenderingNode; exports.SQLDateTimeString = _chunkZLFDB43Jjs.SQLDateTimeString; exports.ServiceUnavailableException = _chunkZLFDB43Jjs.ServiceUnavailableException; exports.SoException = _chunkZLFDB43Jjs.SoException; exports.Sonamu = _chunkZLFDB43Jjs.Sonamu; exports.SonamuQueryMode = _chunkZLFDB43Jjs.SonamuQueryMode; exports.Syncer = _chunkZLFDB43Jjs.Syncer; exports.TargetNotFoundException = _chunkZLFDB43Jjs.TargetNotFoundException; exports.TemplateKey = _chunkZLFDB43Jjs.TemplateKey; exports.TemplateOptions = _chunkZLFDB43Jjs.TemplateOptions; exports.UnauthorizedException = _chunkZLFDB43Jjs.UnauthorizedException; exports.UpsertBuilder = _chunkINTZUNZ6js.UpsertBuilder; exports.api = _chunkZLFDB43Jjs.api; exports.apiParamToTsCode = _chunkZLFDB43Jjs.apiParamToTsCode; exports.apiParamTypeToTsType = _chunkZLFDB43Jjs.apiParamTypeToTsType; exports.asArray = _chunkZLFDB43Jjs.asArray; exports.findApiRootPath = _chunkZLFDB43Jjs.findApiRootPath; exports.findAppRootPath = _chunkZLFDB43Jjs.findAppRootPath; exports.getTextTypeLength = _chunkZLFDB43Jjs.getTextTypeLength; exports.getZodObjectFromApi = _chunkZLFDB43Jjs.getZodObjectFromApi; exports.getZodObjectFromApiParams = _chunkZLFDB43Jjs.getZodObjectFromApiParams; exports.getZodTypeFromApiParamType = _chunkZLFDB43Jjs.getZodTypeFromApiParamType; exports.globAsync = _chunkZLFDB43Jjs.globAsync; exports.hydrate = _chunkZLFDB43Jjs.hydrate; exports.i = i; exports.importMultiple = _chunkZLFDB43Jjs.importMultiple; exports.isBelongsToOneRelationProp = _chunkZLFDB43Jjs.isBelongsToOneRelationProp; exports.isBigIntegerProp = _chunkZLFDB43Jjs.isBigIntegerProp; exports.isBooleanProp = _chunkZLFDB43Jjs.isBooleanProp; exports.isCustomJoinClause = _chunkZLFDB43Jjs.isCustomJoinClause; exports.isDaemonServer = _chunkZLFDB43Jjs.isDaemonServer; exports.isDateProp = _chunkZLFDB43Jjs.isDateProp; exports.isDateTimeProp = _chunkZLFDB43Jjs.isDateTimeProp; exports.isDecimalProp = _chunkZLFDB43Jjs.isDecimalProp; exports.isDevelopment = _chunkZLFDB43Jjs.isDevelopment; exports.isDoubleProp = _chunkZLFDB43Jjs.isDoubleProp; exports.isEnumProp = _chunkZLFDB43Jjs.isEnumProp; exports.isFloatProp = _chunkZLFDB43Jjs.isFloatProp; exports.isHasManyRelationProp = _chunkZLFDB43Jjs.isHasManyRelationProp; exports.isInDocker = _chunkZLFDB43Jjs.isInDocker; exports.isIntegerProp = _chunkZLFDB43Jjs.isIntegerProp; exports.isJsonProp = _chunkZLFDB43Jjs.isJsonProp; exports.isKnexError = _chunkZLFDB43Jjs.isKnexError; exports.isKyselyError = _chunkZLFDB43Jjs.isKyselyError; exports.isLocal = _chunkZLFDB43Jjs.isLocal; exports.isManyToManyRelationProp = _chunkZLFDB43Jjs.isManyToManyRelationProp; exports.isOneToOneRelationProp = _chunkZLFDB43Jjs.isOneToOneRelationProp; exports.isProduction = _chunkZLFDB43Jjs.isProduction; exports.isRefField = _chunkINTZUNZ6js.isRefField; exports.isRelationProp = _chunkZLFDB43Jjs.isRelationProp; exports.isRemote = _chunkZLFDB43Jjs.isRemote; exports.isSoException = _chunkZLFDB43Jjs.isSoException; exports.isStaging = _chunkZLFDB43Jjs.isStaging; exports.isStringProp = _chunkZLFDB43Jjs.isStringProp; exports.isTest = _chunkZLFDB43Jjs.isTest; exports.isTextProp = _chunkZLFDB43Jjs.isTextProp; exports.isTimeProp = _chunkZLFDB43Jjs.isTimeProp; exports.isTimestampProp = _chunkZLFDB43Jjs.isTimestampProp; exports.isUuidProp = _chunkZLFDB43Jjs.isUuidProp; exports.isVirtualProp = _chunkZLFDB43Jjs.isVirtualProp; exports.nonNullable = _chunkZLFDB43Jjs.nonNullable; exports.objToMap = _chunkZLFDB43Jjs.objToMap; exports.p = p; exports.propNodeToZodTypeDef = _chunkZLFDB43Jjs.propNodeToZodTypeDef; exports.propToZodTypeDef = _chunkZLFDB43Jjs.propToZodTypeDef; exports.registeredApis = _chunkZLFDB43Jjs.registeredApis; exports.serializeZodType = _chunkZLFDB43Jjs.serializeZodType; exports.setupErrorHandler = setupErrorHandler; exports.unwrapPromiseOnce = _chunkZLFDB43Jjs.unwrapPromiseOnce; exports.zArrayable = _chunkZLFDB43Jjs.zArrayable; exports.zodTypeToTsTypeDef = _chunkZLFDB43Jjs.zodTypeToTsTypeDef; exports.zodTypeToZodCode = _chunkZLFDB43Jjs.zodTypeToZodCode;
|
|
430
430
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
FixtureManager,
|
|
3
3
|
FixtureManagerClass,
|
|
4
4
|
Migrator
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FKZK27YL.mjs";
|
|
6
6
|
import {
|
|
7
7
|
UpsertBuilder,
|
|
8
8
|
isRefField
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NPLUHS5L.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlreadyProcessedException,
|
|
12
12
|
ApiParamType,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
zArrayable,
|
|
89
89
|
zodTypeToTsTypeDef,
|
|
90
90
|
zodTypeToZodCode
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-LNZTU4JC.mjs";
|
|
92
92
|
import "./chunk-PTFDTOJU.mjs";
|
|
93
93
|
|
|
94
94
|
// src/api/base-frame.ts
|
package/package.json
CHANGED
package/src/syncer/syncer.ts
CHANGED
|
@@ -1420,7 +1420,7 @@ export class Syncer {
|
|
|
1420
1420
|
// generate schemas, types
|
|
1421
1421
|
await Promise.all([
|
|
1422
1422
|
this.actionGenerateSchemas(),
|
|
1423
|
-
...(form.
|
|
1423
|
+
...(form.parentId === undefined
|
|
1424
1424
|
? [
|
|
1425
1425
|
this.generateTemplate("init_types", {
|
|
1426
1426
|
entityId: form.entityId,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|