sonamu 0.2.54 → 0.2.56
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 +48 -48
- package/dist/bin/cli.mjs +1 -1
- package/dist/{chunk-L4KELCY7.mjs → chunk-RHSTOLSM.mjs} +5 -2
- package/dist/chunk-RHSTOLSM.mjs.map +1 -0
- package/dist/{chunk-JOHF7PK4.js → chunk-V6CWU5VD.js} +5 -2
- package/dist/chunk-V6CWU5VD.js.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/api/code-converters.ts +1 -1
- package/src/entity/migrator.ts +3 -0
- package/src/types/types.ts +1 -0
- package/dist/chunk-JOHF7PK4.js.map +0 -1
- package/dist/chunk-L4KELCY7.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -250,7 +250,7 @@ type KnexError = {
|
|
|
250
250
|
sqlState: string;
|
|
251
251
|
};
|
|
252
252
|
declare function isKnexError(e: any): e is KnexError;
|
|
253
|
-
type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "date" | "time" | "dateTime";
|
|
253
|
+
type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "set" | "date" | "time" | "dateTime";
|
|
254
254
|
type MigrationColumn = {
|
|
255
255
|
name: string;
|
|
256
256
|
type: KnexColumnType;
|
package/dist/index.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ type KnexError = {
|
|
|
250
250
|
sqlState: string;
|
|
251
251
|
};
|
|
252
252
|
declare function isKnexError(e: any): e is KnexError;
|
|
253
|
-
type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "date" | "time" | "dateTime";
|
|
253
|
+
type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "set" | "date" | "time" | "dateTime";
|
|
254
254
|
type MigrationColumn = {
|
|
255
255
|
name: string;
|
|
256
256
|
type: KnexColumnType;
|
package/dist/index.js
CHANGED
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkV6CWU5VDjs = require('./chunk-V6CWU5VD.js');
|
|
84
84
|
|
|
85
85
|
// src/exceptions/error-handler.ts
|
|
86
86
|
function setupErrorHandler(server) {
|
|
87
87
|
server.setErrorHandler((error, request, reply) => {
|
|
88
88
|
_nullishCoalesce(error.statusCode, () => ( (error.statusCode = 400)));
|
|
89
|
-
if (
|
|
89
|
+
if (_chunkV6CWU5VDjs.isSoException.call(void 0, error) && error.payload && Array.isArray(error.payload)) {
|
|
90
90
|
const issues = error.payload;
|
|
91
91
|
const [issue] = issues;
|
|
92
92
|
const message = `${issue.message} (${issue.path.join("/")})`;
|
|
@@ -423,5 +423,5 @@ function unique(columns) {
|
|
|
423
423
|
|
|
424
424
|
|
|
425
425
|
|
|
426
|
-
exports.AlreadyProcessedException =
|
|
426
|
+
exports.AlreadyProcessedException = _chunkV6CWU5VDjs.AlreadyProcessedException; exports.ApiParamType = _chunkV6CWU5VDjs.ApiParamType; exports.BadRequestException = _chunkV6CWU5VDjs.BadRequestException; exports.BaseModel = _chunkV6CWU5VDjs.BaseModel; exports.BaseModelClass = _chunkV6CWU5VDjs.BaseModelClass; exports.DB = _chunkV6CWU5VDjs.DB; exports.DuplicateRowException = _chunkV6CWU5VDjs.DuplicateRowException; exports.Entity = _chunkV6CWU5VDjs.Entity; exports.EntityManager = _chunkV6CWU5VDjs.EntityManager; exports.FixtureManager = _chunkV6CWU5VDjs.FixtureManager; exports.FixtureManagerClass = _chunkV6CWU5VDjs.FixtureManagerClass; exports.GenerateOptions = _chunkV6CWU5VDjs.GenerateOptions; exports.InternalServerErrorException = _chunkV6CWU5VDjs.InternalServerErrorException; exports.Migrator = _chunkV6CWU5VDjs.Migrator; exports.NotFoundException = _chunkV6CWU5VDjs.NotFoundException; exports.PathAndCode = _chunkV6CWU5VDjs.PathAndCode; exports.RenderingNode = _chunkV6CWU5VDjs.RenderingNode; exports.SQLDateTimeString = _chunkV6CWU5VDjs.SQLDateTimeString; exports.ServiceUnavailableException = _chunkV6CWU5VDjs.ServiceUnavailableException; exports.SoException = _chunkV6CWU5VDjs.SoException; exports.Sonamu = _chunkV6CWU5VDjs.Sonamu; exports.SonamuQueryMode = _chunkV6CWU5VDjs.SonamuQueryMode; exports.Syncer = _chunkV6CWU5VDjs.Syncer; exports.TargetNotFoundException = _chunkV6CWU5VDjs.TargetNotFoundException; exports.TemplateKey = _chunkV6CWU5VDjs.TemplateKey; exports.TemplateOptions = _chunkV6CWU5VDjs.TemplateOptions; exports.UnauthorizedException = _chunkV6CWU5VDjs.UnauthorizedException; exports.UpsertBuilder = _chunkV6CWU5VDjs.UpsertBuilder; exports.api = _chunkV6CWU5VDjs.api; exports.apiParamToTsCode = _chunkV6CWU5VDjs.apiParamToTsCode; exports.apiParamTypeToTsType = _chunkV6CWU5VDjs.apiParamTypeToTsType; exports.asArray = asArray; exports.findApiRootPath = _chunkV6CWU5VDjs.findApiRootPath; exports.findAppRootPath = _chunkV6CWU5VDjs.findAppRootPath; exports.getTextTypeLength = _chunkV6CWU5VDjs.getTextTypeLength; exports.getZodObjectFromApi = _chunkV6CWU5VDjs.getZodObjectFromApi; exports.getZodObjectFromApiParams = _chunkV6CWU5VDjs.getZodObjectFromApiParams; exports.getZodTypeFromApiParamType = _chunkV6CWU5VDjs.getZodTypeFromApiParamType; exports.globAsync = _chunkV6CWU5VDjs.globAsync; exports.i = i; exports.importMultiple = _chunkV6CWU5VDjs.importMultiple; exports.isBelongsToOneRelationProp = _chunkV6CWU5VDjs.isBelongsToOneRelationProp; exports.isBigIntegerProp = _chunkV6CWU5VDjs.isBigIntegerProp; exports.isBooleanProp = _chunkV6CWU5VDjs.isBooleanProp; exports.isCustomJoinClause = _chunkV6CWU5VDjs.isCustomJoinClause; exports.isDaemonServer = _chunkV6CWU5VDjs.isDaemonServer; exports.isDateProp = _chunkV6CWU5VDjs.isDateProp; exports.isDateTimeProp = _chunkV6CWU5VDjs.isDateTimeProp; exports.isDecimalProp = _chunkV6CWU5VDjs.isDecimalProp; exports.isDevelopment = _chunkV6CWU5VDjs.isDevelopment; exports.isDoubleProp = _chunkV6CWU5VDjs.isDoubleProp; exports.isEnumProp = _chunkV6CWU5VDjs.isEnumProp; exports.isFloatProp = _chunkV6CWU5VDjs.isFloatProp; exports.isHasManyRelationProp = _chunkV6CWU5VDjs.isHasManyRelationProp; exports.isInDocker = _chunkV6CWU5VDjs.isInDocker; exports.isIntegerProp = _chunkV6CWU5VDjs.isIntegerProp; exports.isJsonProp = _chunkV6CWU5VDjs.isJsonProp; exports.isKnexError = _chunkV6CWU5VDjs.isKnexError; exports.isLocal = _chunkV6CWU5VDjs.isLocal; exports.isManyToManyRelationProp = _chunkV6CWU5VDjs.isManyToManyRelationProp; exports.isOneToOneRelationProp = _chunkV6CWU5VDjs.isOneToOneRelationProp; exports.isProduction = _chunkV6CWU5VDjs.isProduction; exports.isRefField = _chunkV6CWU5VDjs.isRefField; exports.isRelationProp = _chunkV6CWU5VDjs.isRelationProp; exports.isRemote = _chunkV6CWU5VDjs.isRemote; exports.isSoException = _chunkV6CWU5VDjs.isSoException; exports.isStaging = _chunkV6CWU5VDjs.isStaging; exports.isStringProp = _chunkV6CWU5VDjs.isStringProp; exports.isTest = _chunkV6CWU5VDjs.isTest; exports.isTextProp = _chunkV6CWU5VDjs.isTextProp; exports.isTimeProp = _chunkV6CWU5VDjs.isTimeProp; exports.isTimestampProp = _chunkV6CWU5VDjs.isTimestampProp; exports.isUuidProp = _chunkV6CWU5VDjs.isUuidProp; exports.isVirtualProp = _chunkV6CWU5VDjs.isVirtualProp; exports.nonNullable = _chunkV6CWU5VDjs.nonNullable; exports.objToMap = objToMap; exports.p = p; exports.propNodeToZodTypeDef = _chunkV6CWU5VDjs.propNodeToZodTypeDef; exports.propToZodTypeDef = _chunkV6CWU5VDjs.propToZodTypeDef; exports.registeredApis = _chunkV6CWU5VDjs.registeredApis; exports.serializeZodType = _chunkV6CWU5VDjs.serializeZodType; exports.setupErrorHandler = setupErrorHandler; exports.unwrapPromiseOnce = _chunkV6CWU5VDjs.unwrapPromiseOnce; exports.zArrayable = _chunkV6CWU5VDjs.zArrayable; exports.zodTypeToTsTypeDef = _chunkV6CWU5VDjs.zodTypeToTsTypeDef; exports.zodTypeToZodCode = _chunkV6CWU5VDjs.zodTypeToZodCode;
|
|
427
427
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -318,7 +318,7 @@ export function propToZodTypeDef(
|
|
|
318
318
|
return `// ${prop.name}: ${prop.relationType} ${prop.with}`;
|
|
319
319
|
}
|
|
320
320
|
} else {
|
|
321
|
-
return
|
|
321
|
+
return `// unable to resolve: ${JSON.stringify(prop)}`;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
if ((prop as { unsigned?: boolean }).unsigned) {
|
package/src/entity/migrator.ts
CHANGED
|
@@ -1039,6 +1039,9 @@ export class Migrator {
|
|
|
1039
1039
|
unsigned: true,
|
|
1040
1040
|
}),
|
|
1041
1041
|
};
|
|
1042
|
+
} else if (rawType.startsWith("set")) {
|
|
1043
|
+
const [, _rest] = rawType.match(/set\((.*)\)/) ?? [];
|
|
1044
|
+
return { type: "set" };
|
|
1042
1045
|
}
|
|
1043
1046
|
throw new Error(`resolve 불가능한 DB컬럼 타입 ${colType} ${rawType}`);
|
|
1044
1047
|
}
|