@h3ravel/arquebus 0.3.4 → 0.3.6
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/bin/index.cjs +4 -6
- package/bin/index.js +4 -6
- package/dist/index.cjs +1 -2
- package/dist/index.js +1 -2
- package/dist/migrations/index.cjs +7 -18
- package/dist/migrations/index.d.cts +6 -8
- package/dist/migrations/index.d.ts +6 -8
- package/dist/migrations/index.js +6 -7
- package/package.json +1 -1
package/bin/index.cjs
CHANGED
|
@@ -204,7 +204,6 @@ var MigrationRepository = class {
|
|
|
204
204
|
this.connection = name$1;
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
var migration_repository_default = MigrationRepository;
|
|
208
207
|
|
|
209
208
|
//#endregion
|
|
210
209
|
//#region src/migrations/migrator.ts
|
|
@@ -3902,7 +3901,7 @@ var Migrate = class {
|
|
|
3902
3901
|
arquebus_default.addConnection(connection, name$1);
|
|
3903
3902
|
});
|
|
3904
3903
|
}
|
|
3905
|
-
const repository$1 = new
|
|
3904
|
+
const repository$1 = new MigrationRepository(arquebus_default, table);
|
|
3906
3905
|
const migrator = new migrator_default(repository$1, arquebus_default);
|
|
3907
3906
|
return {
|
|
3908
3907
|
arquebus: arquebus_default,
|
|
@@ -3997,12 +3996,11 @@ var MigrationCreator = class {
|
|
|
3997
3996
|
throw new Error("Unable to determine dirname");
|
|
3998
3997
|
}
|
|
3999
3998
|
};
|
|
4000
|
-
var migration_creator_default = MigrationCreator;
|
|
4001
3999
|
|
|
4002
4000
|
//#endregion
|
|
4003
4001
|
//#region package.json
|
|
4004
4002
|
var name = "@h3ravel/arquebus";
|
|
4005
|
-
var version = "0.3.
|
|
4003
|
+
var version = "0.3.5";
|
|
4006
4004
|
var packageManager = "pnpm@10.14.0";
|
|
4007
4005
|
var description = "Arquebus ORM is a Beautiful, expressive ORM inspired by Laravel's Eloquent, designed for TypeScript applications and for the H3ravel Framework.";
|
|
4008
4006
|
var homepage = "https://h3ravel.toneflix.net/arquebus";
|
|
@@ -4279,7 +4277,7 @@ var Cli = class Cli {
|
|
|
4279
4277
|
create = !!guessed[1];
|
|
4280
4278
|
}
|
|
4281
4279
|
this.output.info("INFO: Creating Migration");
|
|
4282
|
-
const fileName = await new
|
|
4280
|
+
const fileName = await new MigrationCreator(void 0, opts.type).create(name$1, migrationPath, table, create);
|
|
4283
4281
|
this.output.success(`INFO: Migration Created \n ${chalk.default.gray(path.default.basename(fileName))}`, true);
|
|
4284
4282
|
} catch (e) {
|
|
4285
4283
|
this.output.error("ERROR: " + e);
|
|
@@ -4296,7 +4294,7 @@ var Cli = class Cli {
|
|
|
4296
4294
|
const basePath = path.default.join(this.cwd, opts.path ?? ((_this$config$migratio4 = this.config.migrations) === null || _this$config$migratio4 === void 0 ? void 0 : _this$config$migratio4.path) ?? "./migrations");
|
|
4297
4295
|
const pkgJson = await import(path.default.join(packagePath, "package.json"));
|
|
4298
4296
|
if (!packagePath) this.output.error(`ERROR: package ${pkg} not found`);
|
|
4299
|
-
const creator = new
|
|
4297
|
+
const creator = new MigrationCreator(path.default.join(packagePath, pkgJson.migrations ?? "migrations"));
|
|
4300
4298
|
this.output.info(`INFO: Publishing migrations from ${chalk.default.italic.gray(pkgJson.name + "@" + pkgJson.version)}`);
|
|
4301
4299
|
await creator.publish(basePath, (fileName) => {
|
|
4302
4300
|
__h3ravel_shared.Logger.twoColumnLog(fileName, chalk.default.green("PUBLISHED"));
|
package/bin/index.js
CHANGED
|
@@ -167,7 +167,6 @@ var MigrationRepository = class {
|
|
|
167
167
|
this.connection = name$1;
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
var migration_repository_default = MigrationRepository;
|
|
171
170
|
|
|
172
171
|
//#endregion
|
|
173
172
|
//#region src/migrations/migrator.ts
|
|
@@ -3865,7 +3864,7 @@ var Migrate = class {
|
|
|
3865
3864
|
arquebus_default.addConnection(connection, name$1);
|
|
3866
3865
|
});
|
|
3867
3866
|
}
|
|
3868
|
-
const repository$1 = new
|
|
3867
|
+
const repository$1 = new MigrationRepository(arquebus_default, table);
|
|
3869
3868
|
const migrator = new migrator_default(repository$1, arquebus_default);
|
|
3870
3869
|
return {
|
|
3871
3870
|
arquebus: arquebus_default,
|
|
@@ -3960,12 +3959,11 @@ var MigrationCreator = class {
|
|
|
3960
3959
|
throw new Error("Unable to determine dirname");
|
|
3961
3960
|
}
|
|
3962
3961
|
};
|
|
3963
|
-
var migration_creator_default = MigrationCreator;
|
|
3964
3962
|
|
|
3965
3963
|
//#endregion
|
|
3966
3964
|
//#region package.json
|
|
3967
3965
|
var name = "@h3ravel/arquebus";
|
|
3968
|
-
var version = "0.3.
|
|
3966
|
+
var version = "0.3.5";
|
|
3969
3967
|
var packageManager = "pnpm@10.14.0";
|
|
3970
3968
|
var description = "Arquebus ORM is a Beautiful, expressive ORM inspired by Laravel's Eloquent, designed for TypeScript applications and for the H3ravel Framework.";
|
|
3971
3969
|
var homepage = "https://h3ravel.toneflix.net/arquebus";
|
|
@@ -4242,7 +4240,7 @@ var Cli = class Cli {
|
|
|
4242
4240
|
create = !!guessed[1];
|
|
4243
4241
|
}
|
|
4244
4242
|
this.output.info("INFO: Creating Migration");
|
|
4245
|
-
const fileName = await new
|
|
4243
|
+
const fileName = await new MigrationCreator(void 0, opts.type).create(name$1, migrationPath, table, create);
|
|
4246
4244
|
this.output.success(`INFO: Migration Created \n ${chalk.gray(path.basename(fileName))}`, true);
|
|
4247
4245
|
} catch (e) {
|
|
4248
4246
|
this.output.error("ERROR: " + e);
|
|
@@ -4259,7 +4257,7 @@ var Cli = class Cli {
|
|
|
4259
4257
|
const basePath = path.join(this.cwd, opts.path ?? ((_this$config$migratio4 = this.config.migrations) === null || _this$config$migratio4 === void 0 ? void 0 : _this$config$migratio4.path) ?? "./migrations");
|
|
4260
4258
|
const pkgJson = await import(path.join(packagePath, "package.json"));
|
|
4261
4259
|
if (!packagePath) this.output.error(`ERROR: package ${pkg} not found`);
|
|
4262
|
-
const creator = new
|
|
4260
|
+
const creator = new MigrationCreator(path.join(packagePath, pkgJson.migrations ?? "migrations"));
|
|
4263
4261
|
this.output.info(`INFO: Publishing migrations from ${chalk.italic.gray(pkgJson.name + "@" + pkgJson.version)}`);
|
|
4264
4262
|
await creator.publish(basePath, (fileName) => {
|
|
4265
4263
|
Logger.twoColumnLog(fileName, chalk.green("PUBLISHED"));
|
package/dist/index.cjs
CHANGED
|
@@ -3563,7 +3563,6 @@ var MigrationRepository = class {
|
|
|
3563
3563
|
this.connection = name;
|
|
3564
3564
|
}
|
|
3565
3565
|
};
|
|
3566
|
-
var migration_repository_default = MigrationRepository;
|
|
3567
3566
|
|
|
3568
3567
|
//#endregion
|
|
3569
3568
|
//#region src/migrations/migrator.ts
|
|
@@ -3905,7 +3904,7 @@ var Migrate = class {
|
|
|
3905
3904
|
arquebus_default.addConnection(connection, name);
|
|
3906
3905
|
});
|
|
3907
3906
|
}
|
|
3908
|
-
const repository = new
|
|
3907
|
+
const repository = new MigrationRepository(arquebus_default, table);
|
|
3909
3908
|
const migrator = new migrator_default(repository, arquebus_default);
|
|
3910
3909
|
return {
|
|
3911
3910
|
arquebus: arquebus_default,
|
package/dist/index.js
CHANGED
|
@@ -3532,7 +3532,6 @@ var MigrationRepository = class {
|
|
|
3532
3532
|
this.connection = name;
|
|
3533
3533
|
}
|
|
3534
3534
|
};
|
|
3535
|
-
var migration_repository_default = MigrationRepository;
|
|
3536
3535
|
|
|
3537
3536
|
//#endregion
|
|
3538
3537
|
//#region src/migrations/migrator.ts
|
|
@@ -3874,7 +3873,7 @@ var Migrate = class {
|
|
|
3874
3873
|
arquebus_default.addConnection(connection, name);
|
|
3875
3874
|
});
|
|
3876
3875
|
}
|
|
3877
|
-
const repository = new
|
|
3876
|
+
const repository = new MigrationRepository(arquebus_default, table);
|
|
3878
3877
|
const migrator = new migrator_default(repository, arquebus_default);
|
|
3879
3878
|
return {
|
|
3880
3879
|
arquebus: arquebus_default,
|
|
@@ -63,7 +63,6 @@ let node_url = require("node:url");
|
|
|
63
63
|
node_url = __toESM(node_url);
|
|
64
64
|
|
|
65
65
|
//#region src/migrations/migration-repository.ts
|
|
66
|
-
var migration_repository_exports = /* @__PURE__ */ __export({ default: () => migration_repository_default });
|
|
67
66
|
var MigrationRepository = class {
|
|
68
67
|
resolver;
|
|
69
68
|
table;
|
|
@@ -130,11 +129,13 @@ var MigrationRepository = class {
|
|
|
130
129
|
this.connection = name;
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
|
-
var migration_repository_default = MigrationRepository;
|
|
134
132
|
|
|
135
133
|
//#endregion
|
|
136
134
|
//#region src/migrations/migrator.ts
|
|
137
|
-
var migrator_exports = /* @__PURE__ */ __export({
|
|
135
|
+
var migrator_exports = /* @__PURE__ */ __export({
|
|
136
|
+
Migrator: () => Migrator,
|
|
137
|
+
default: () => migrator_default
|
|
138
|
+
});
|
|
138
139
|
async function glob(folderPath) {
|
|
139
140
|
const files = await node_fs_promises.default.readdir(folderPath);
|
|
140
141
|
const allFiles = [];
|
|
@@ -3882,7 +3883,7 @@ var Migrate = class {
|
|
|
3882
3883
|
arquebus_default.addConnection(connection, name);
|
|
3883
3884
|
});
|
|
3884
3885
|
}
|
|
3885
|
-
const repository = new
|
|
3886
|
+
const repository = new MigrationRepository(arquebus_default, table);
|
|
3886
3887
|
const migrator = new migrator_default(repository, arquebus_default);
|
|
3887
3888
|
return {
|
|
3888
3889
|
arquebus: arquebus_default,
|
|
@@ -3909,7 +3910,6 @@ var migration_default = Migration;
|
|
|
3909
3910
|
|
|
3910
3911
|
//#endregion
|
|
3911
3912
|
//#region src/migrations/migration-creator.ts
|
|
3912
|
-
var migration_creator_exports = /* @__PURE__ */ __export({ default: () => migration_creator_default });
|
|
3913
3913
|
var MigrationCreator = class {
|
|
3914
3914
|
postCreate = [];
|
|
3915
3915
|
constructor(customStubPath, type = "js") {
|
|
@@ -3994,7 +3994,6 @@ var MigrationCreator = class {
|
|
|
3994
3994
|
throw new Error("Unable to determine dirname");
|
|
3995
3995
|
}
|
|
3996
3996
|
};
|
|
3997
|
-
var migration_creator_default = MigrationCreator;
|
|
3998
3997
|
|
|
3999
3998
|
//#endregion
|
|
4000
3999
|
exports.Migrate = Migrate;
|
|
@@ -4004,18 +4003,8 @@ Object.defineProperty(exports, 'Migration', {
|
|
|
4004
4003
|
return migration_exports;
|
|
4005
4004
|
}
|
|
4006
4005
|
});
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
get: function () {
|
|
4010
|
-
return migration_creator_exports;
|
|
4011
|
-
}
|
|
4012
|
-
});
|
|
4013
|
-
Object.defineProperty(exports, 'MigrationRepository', {
|
|
4014
|
-
enumerable: true,
|
|
4015
|
-
get: function () {
|
|
4016
|
-
return migration_repository_exports;
|
|
4017
|
-
}
|
|
4018
|
-
});
|
|
4006
|
+
exports.MigrationCreator = MigrationCreator;
|
|
4007
|
+
exports.MigrationRepository = MigrationRepository;
|
|
4019
4008
|
Object.defineProperty(exports, 'Migrator', {
|
|
4020
4009
|
enumerable: true,
|
|
4021
4010
|
get: function () {
|
|
@@ -1181,9 +1181,8 @@ declare class Migration extends Inference {
|
|
|
1181
1181
|
withinTransaction: boolean;
|
|
1182
1182
|
getConnection(): TBaseConfig['client'];
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
}
|
|
1184
|
+
//#endregion
|
|
1185
|
+
//#region src/migrations/migration-repository.d.ts
|
|
1187
1186
|
declare class MigrationRepository {
|
|
1188
1187
|
resolver: typeof arquebus;
|
|
1189
1188
|
table: string;
|
|
@@ -1206,7 +1205,7 @@ declare class MigrationRepository {
|
|
|
1206
1205
|
setSource(name: TBaseConfig['client']): void;
|
|
1207
1206
|
}
|
|
1208
1207
|
declare namespace migrator_d_exports {
|
|
1209
|
-
export { MigrationOptions, Migrator as default };
|
|
1208
|
+
export { MigrationOptions, Migrator, Migrator as default };
|
|
1210
1209
|
}
|
|
1211
1210
|
interface MigrationOptions {
|
|
1212
1211
|
pretend?: boolean;
|
|
@@ -1327,9 +1326,8 @@ declare class Migrate {
|
|
|
1327
1326
|
migrator: Migrator;
|
|
1328
1327
|
}>;
|
|
1329
1328
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
}
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region src/migrations/migration-creator.d.ts
|
|
1333
1331
|
declare class MigrationCreator {
|
|
1334
1332
|
private customStubPath?;
|
|
1335
1333
|
private type;
|
|
@@ -1363,4 +1361,4 @@ declare class MigrationCreator {
|
|
|
1363
1361
|
getDirname(meta: ImportMeta | null): string;
|
|
1364
1362
|
}
|
|
1365
1363
|
//#endregion
|
|
1366
|
-
export { Migrate, migration_d_exports as Migration,
|
|
1364
|
+
export { Migrate, migration_d_exports as Migration, MigrationCreator, MigrationRepository, migrator_d_exports as Migrator };
|
|
@@ -1178,9 +1178,8 @@ declare class Migration extends Inference {
|
|
|
1178
1178
|
withinTransaction: boolean;
|
|
1179
1179
|
getConnection(): TBaseConfig['client'];
|
|
1180
1180
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
}
|
|
1181
|
+
//#endregion
|
|
1182
|
+
//#region src/migrations/migration-repository.d.ts
|
|
1184
1183
|
declare class MigrationRepository {
|
|
1185
1184
|
resolver: typeof arquebus;
|
|
1186
1185
|
table: string;
|
|
@@ -1203,7 +1202,7 @@ declare class MigrationRepository {
|
|
|
1203
1202
|
setSource(name: TBaseConfig['client']): void;
|
|
1204
1203
|
}
|
|
1205
1204
|
declare namespace migrator_d_exports {
|
|
1206
|
-
export { MigrationOptions, Migrator as default };
|
|
1205
|
+
export { MigrationOptions, Migrator, Migrator as default };
|
|
1207
1206
|
}
|
|
1208
1207
|
interface MigrationOptions {
|
|
1209
1208
|
pretend?: boolean;
|
|
@@ -1324,9 +1323,8 @@ declare class Migrate {
|
|
|
1324
1323
|
migrator: Migrator;
|
|
1325
1324
|
}>;
|
|
1326
1325
|
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
}
|
|
1326
|
+
//#endregion
|
|
1327
|
+
//#region src/migrations/migration-creator.d.ts
|
|
1330
1328
|
declare class MigrationCreator {
|
|
1331
1329
|
private customStubPath?;
|
|
1332
1330
|
private type;
|
|
@@ -1360,4 +1358,4 @@ declare class MigrationCreator {
|
|
|
1360
1358
|
getDirname(meta: ImportMeta | null): string;
|
|
1361
1359
|
}
|
|
1362
1360
|
//#endregion
|
|
1363
|
-
export { Migrate, migration_d_exports as Migration,
|
|
1361
|
+
export { Migrate, migration_d_exports as Migration, MigrationCreator, MigrationRepository, migrator_d_exports as Migrator };
|
package/dist/migrations/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import { dirname } from "node:path";
|
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
18
18
|
|
|
19
19
|
//#region src/migrations/migration-repository.ts
|
|
20
|
-
var migration_repository_exports = /* @__PURE__ */ __export({ default: () => migration_repository_default });
|
|
21
20
|
var MigrationRepository = class {
|
|
22
21
|
resolver;
|
|
23
22
|
table;
|
|
@@ -84,11 +83,13 @@ var MigrationRepository = class {
|
|
|
84
83
|
this.connection = name;
|
|
85
84
|
}
|
|
86
85
|
};
|
|
87
|
-
var migration_repository_default = MigrationRepository;
|
|
88
86
|
|
|
89
87
|
//#endregion
|
|
90
88
|
//#region src/migrations/migrator.ts
|
|
91
|
-
var migrator_exports = /* @__PURE__ */ __export({
|
|
89
|
+
var migrator_exports = /* @__PURE__ */ __export({
|
|
90
|
+
Migrator: () => Migrator,
|
|
91
|
+
default: () => migrator_default
|
|
92
|
+
});
|
|
92
93
|
async function glob(folderPath) {
|
|
93
94
|
const files = await fs.readdir(folderPath);
|
|
94
95
|
const allFiles = [];
|
|
@@ -3836,7 +3837,7 @@ var Migrate = class {
|
|
|
3836
3837
|
arquebus_default.addConnection(connection, name);
|
|
3837
3838
|
});
|
|
3838
3839
|
}
|
|
3839
|
-
const repository = new
|
|
3840
|
+
const repository = new MigrationRepository(arquebus_default, table);
|
|
3840
3841
|
const migrator = new migrator_default(repository, arquebus_default);
|
|
3841
3842
|
return {
|
|
3842
3843
|
arquebus: arquebus_default,
|
|
@@ -3863,7 +3864,6 @@ var migration_default = Migration;
|
|
|
3863
3864
|
|
|
3864
3865
|
//#endregion
|
|
3865
3866
|
//#region src/migrations/migration-creator.ts
|
|
3866
|
-
var migration_creator_exports = /* @__PURE__ */ __export({ default: () => migration_creator_default });
|
|
3867
3867
|
var MigrationCreator = class {
|
|
3868
3868
|
postCreate = [];
|
|
3869
3869
|
constructor(customStubPath, type = "js") {
|
|
@@ -3948,7 +3948,6 @@ var MigrationCreator = class {
|
|
|
3948
3948
|
throw new Error("Unable to determine dirname");
|
|
3949
3949
|
}
|
|
3950
3950
|
};
|
|
3951
|
-
var migration_creator_default = MigrationCreator;
|
|
3952
3951
|
|
|
3953
3952
|
//#endregion
|
|
3954
|
-
export { Migrate, migration_exports as Migration,
|
|
3953
|
+
export { Migrate, migration_exports as Migration, MigrationCreator, MigrationRepository, migrator_exports as Migrator };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/arquebus",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Arquebus ORM is a Beautiful, expressive ORM inspired by Laravel's Eloquent, designed for TypeScript applications and for the H3ravel Framework.",
|
|
5
5
|
"homepage": "https://h3ravel.toneflix.net/arquebus",
|
|
6
6
|
"bin": {
|