@payloadcms/db-postgres 3.0.0-alpha.22 → 3.0.0-alpha.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.js +1 -1
- package/dist/create.js +2 -2
- package/dist/createGlobal.d.ts +1 -1
- package/dist/createGlobal.d.ts.map +1 -1
- package/dist/createGlobal.js +2 -2
- package/dist/createGlobalVersion.d.ts +1 -1
- package/dist/createGlobalVersion.d.ts.map +1 -1
- package/dist/createGlobalVersion.js +2 -2
- package/dist/createMigration.js +1 -1
- package/dist/createVersion.d.ts +1 -1
- package/dist/createVersion.d.ts.map +1 -1
- package/dist/createVersion.js +2 -2
- package/dist/deleteMany.js +2 -2
- package/dist/deleteOne.js +4 -4
- package/dist/deleteVersions.js +2 -2
- package/dist/destroy.js +1 -1
- package/dist/find/buildFindManyArgs.d.ts +1 -1
- package/dist/find/buildFindManyArgs.d.ts.map +1 -1
- package/dist/find/buildFindManyArgs.js +2 -2
- package/dist/find/findMany.d.ts +1 -1
- package/dist/find/findMany.d.ts.map +1 -1
- package/dist/find/findMany.js +5 -5
- package/dist/find/traverseFields.d.ts +1 -1
- package/dist/find/traverseFields.d.ts.map +1 -1
- package/dist/find/traverseFields.js +1 -1
- package/dist/find.js +2 -2
- package/dist/findGlobal.js +2 -2
- package/dist/findGlobalVersions.js +2 -2
- package/dist/findOne.d.ts +1 -1
- package/dist/findOne.d.ts.map +1 -1
- package/dist/findOne.js +2 -2
- package/dist/findVersions.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -31
- package/dist/init.js +2 -2
- package/dist/migrate.d.ts +1 -1
- package/dist/migrate.d.ts.map +1 -1
- package/dist/migrate.js +4 -4
- package/dist/migrateDown.d.ts +1 -1
- package/dist/migrateDown.d.ts.map +1 -1
- package/dist/migrateDown.js +3 -3
- package/dist/migrateFresh.d.ts +1 -1
- package/dist/migrateFresh.d.ts.map +1 -1
- package/dist/migrateFresh.js +2 -2
- package/dist/migrateRefresh.d.ts +1 -1
- package/dist/migrateRefresh.d.ts.map +1 -1
- package/dist/migrateRefresh.js +3 -3
- package/dist/migrateReset.d.ts +1 -1
- package/dist/migrateReset.d.ts.map +1 -1
- package/dist/migrateReset.js +2 -2
- package/dist/migrateStatus.d.ts +1 -1
- package/dist/migrateStatus.d.ts.map +1 -1
- package/dist/migrateStatus.js +2 -2
- package/dist/queries/buildAndOrConditions.d.ts +2 -2
- package/dist/queries/buildAndOrConditions.d.ts.map +1 -1
- package/dist/queries/buildAndOrConditions.js +2 -2
- package/dist/queries/buildQuery.d.ts +1 -1
- package/dist/queries/buildQuery.d.ts.map +1 -1
- package/dist/queries/buildQuery.js +3 -3
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +2 -2
- package/dist/queries/createJSONQuery/index.js +3 -3
- package/dist/queries/getTableColumnFromPath.d.ts +2 -2
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
- package/dist/queries/getTableColumnFromPath.js +1 -1
- package/dist/queries/parseParams.d.ts +2 -2
- package/dist/queries/parseParams.d.ts.map +1 -1
- package/dist/queries/parseParams.js +7 -7
- package/dist/queries/sanitizeQueryValue.d.ts +1 -1
- package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
- package/dist/queries/sanitizeQueryValue.js +1 -1
- package/dist/queryDrafts.js +2 -2
- package/dist/schema/build.d.ts +1 -1
- package/dist/schema/build.d.ts.map +1 -1
- package/dist/schema/build.js +4 -4
- package/dist/schema/createIndex.d.ts +1 -1
- package/dist/schema/createIndex.d.ts.map +1 -1
- package/dist/schema/createIndex.js +1 -1
- package/dist/schema/parentIDColumnMap.d.ts +1 -1
- package/dist/schema/parentIDColumnMap.d.ts.map +1 -1
- package/dist/schema/parentIDColumnMap.js +1 -1
- package/dist/schema/setColumnID.d.ts +1 -1
- package/dist/schema/setColumnID.d.ts.map +1 -1
- package/dist/schema/setColumnID.js +1 -1
- package/dist/schema/traverseFields.d.ts +1 -1
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +7 -7
- package/dist/schema/validateExistingBlockIsIdentical.d.ts +1 -1
- package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -1
- package/dist/schema/validateExistingBlockIsIdentical.js +1 -1
- package/dist/transactions/beginTransaction.js +1 -1
- package/dist/transform/read/index.js +4 -4
- package/dist/transform/read/traverseFields.d.ts +1 -1
- package/dist/transform/read/traverseFields.d.ts.map +1 -1
- package/dist/transform/read/traverseFields.js +4 -4
- package/dist/transform/write/array.d.ts +2 -2
- package/dist/transform/write/array.d.ts.map +1 -1
- package/dist/transform/write/array.js +3 -3
- package/dist/transform/write/blocks.d.ts +2 -2
- package/dist/transform/write/blocks.d.ts.map +1 -1
- package/dist/transform/write/blocks.js +2 -2
- package/dist/transform/write/index.d.ts +2 -2
- package/dist/transform/write/index.d.ts.map +1 -1
- package/dist/transform/write/index.js +2 -2
- package/dist/transform/write/selects.js +2 -2
- package/dist/transform/write/traverseFields.d.ts +2 -2
- package/dist/transform/write/traverseFields.d.ts.map +1 -1
- package/dist/transform/write/traverseFields.js +8 -8
- package/dist/update.js +4 -4
- package/dist/updateGlobal.d.ts +1 -1
- package/dist/updateGlobal.d.ts.map +1 -1
- package/dist/updateGlobal.js +2 -2
- package/dist/updateGlobalVersion.d.ts +1 -1
- package/dist/updateGlobalVersion.d.ts.map +1 -1
- package/dist/updateGlobalVersion.js +3 -3
- package/dist/updateVersion.d.ts +1 -1
- package/dist/updateVersion.d.ts.map +1 -1
- package/dist/updateVersion.js +3 -3
- package/dist/upsertRow/deleteExistingArrayRows.d.ts +1 -1
- package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +1 -1
- package/dist/upsertRow/deleteExistingArrayRows.js +1 -1
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts +1 -1
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +1 -1
- package/dist/upsertRow/deleteExistingRowsByPath.js +1 -1
- package/dist/upsertRow/index.d.ts +1 -1
- package/dist/upsertRow/index.d.ts.map +1 -1
- package/dist/upsertRow/index.js +7 -7
- package/dist/upsertRow/insertArrays.d.ts +2 -2
- package/dist/upsertRow/insertArrays.d.ts.map +1 -1
- package/dist/upsertRow/insertArrays.js +1 -1
- package/dist/upsertRow/types.d.ts +1 -1
- package/dist/upsertRow/types.d.ts.map +1 -1
- package/dist/upsertRow/types.js +1 -1
- package/dist/utilities/createMigrationTable.d.ts +1 -1
- package/dist/utilities/createMigrationTable.d.ts.map +1 -1
- package/dist/utilities/createMigrationTable.js +1 -1
- package/dist/utilities/migrationTableExists.d.ts +1 -1
- package/dist/utilities/migrationTableExists.d.ts.map +1 -1
- package/dist/utilities/migrationTableExists.js +1 -1
- package/package.json +3 -3
package/dist/find.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import toSnakeCase from 'to-snake-case';
|
2
|
-
import { findMany } from './find/findMany';
|
2
|
+
import { findMany } from './find/findMany.js';
|
3
3
|
export const find = async function find({ collection, limit: limitArg, locale, page = 1, pagination, req = {}, sort: sortArg, where: whereArg }) {
|
4
4
|
const collectionConfig = this.payload.collections[collection].config;
|
5
5
|
const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
|
@@ -17,4 +17,4 @@ export const find = async function find({ collection, limit: limitArg, locale, p
|
|
17
17
|
});
|
18
18
|
};
|
19
19
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHRvU25ha2VDYXNlIGZyb20gJ3RvLXNuYWtlLWNh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any } from './find/findMany';
|
2
|
+
import { findMany } from './find/findMany.js';
|
3
3
|
export const findGlobal = async function findGlobal({ locale, req, slug, where }) {
|
4
4
|
const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
|
5
5
|
const tableName = toSnakeCase(slug);
|
@@ -20,4 +20,4 @@ export const findGlobal = async function findGlobal({ locale, req, slug, where }
|
|
20
20
|
return {};
|
21
21
|
};
|
22
22
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEdsb2JhbCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMuZC50cydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnkuanMnXG5cbmV4cG9ydCBjb25zdCBmaW5kR2xvYmFsOiBGaW5kR2xvYmFsID0gYXN5bmMgZnVuY3Rpb24gZmluZEdsb2JhbChcbiAgdGhpczogUG9zdGdyZXNBZGFwdGVyLFxuICB7IGxvY2FsZSwgcmVxLCBzbHVnLCB3aGVyZSB9LFxuKSB7XG4gIGNvbnN0IGdsb2JhbENvbmZpZyA9IHRoaXMucGF5bG9hZC5nbG9iYWxzLmNvbmZpZy5maW5kKChjb25maWcpID0+IGNvbmZpZy5zbHVnID09PSBzbHVnKVxuICBjb25zdCB0YWJsZU5hbWUgPSB0b1NuYWtlQ2FzZShzbHVnKVxuXG4gIGNvbnN0IHtcbiAgICBkb2NzOiBbZG9jXSxcbiAgfSA9IGF3YWl0IGZpbmRNYW55KHtcbiAgICBhZGFw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TLE1BQU07UUFDM0JDLE9BQU87UUFDUGQ7UUFDQWUsWUFBWTtRQUNaZDtRQUNBUTtRQUNBTjtJQUNGO0lBRUEsSUFBSVEsS0FBSztRQUNQQSxJQUFJSyxVQUFVLEdBQUdkO1FBQ2pCLE9BQU9TO0lBQ1Q7SUFFQSxPQUFPLENBQUM7QUFDVixFQUFDIn0=
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { buildVersionGlobalFields } from 'payload/versions';
|
2
2
|
import toSnakeCase from 'to-snake-case';
|
3
|
-
import { findMany } from './find/findMany';
|
3
|
+
import { findMany } from './find/findMany.js';
|
4
4
|
export const findGlobalVersions = async function findGlobalVersions({ global, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
|
5
5
|
const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
|
6
6
|
const sort = typeof sortArg === 'string' ? sortArg : '-createdAt';
|
@@ -21,4 +21,4 @@ export const findGlobalVersions = async function findGlobalVersions({ global, li
|
|
21
21
|
});
|
22
22
|
};
|
23
23
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kR2xvYmFsVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkR2xvYmFsQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRWZXJzaW9uR2xvYmFsRmllbGRzIH0gZnJvbSAncGF5bG9hZC92ZXJzaW9ucydcbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBv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FTLElBQUk7UUFDYkQ7UUFDQWhCO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FTO1FBQ0FQO0lBQ0Y7QUFDRixFQUFDIn0=
|
package/dist/findOne.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { FindOneArgs } from 'payload/database';
|
2
2
|
import type { TypeWithID } from 'payload/types';
|
3
|
-
import type { PostgresAdapter } from './types';
|
3
|
+
import type { PostgresAdapter } from './types.d.ts';
|
4
4
|
export declare function findOne<T extends TypeWithID>(this: PostgresAdapter, { collection, locale, req, where: incomingWhere }: FindOneArgs): Promise<T>;
|
5
5
|
//# sourceMappingURL=findOne.d.ts.map
|
package/dist/findOne.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAInD,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,GACpF,OAAO,CAAC,CAAC,CAAC,CAiBZ"}
|
package/dist/findOne.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import toSnakeCase from 'to-snake-case';
|
2
|
-
import { findMany } from './find/findMany';
|
2
|
+
import { findMany } from './find/findMany.js';
|
3
3
|
export async function findOne({ collection, locale, req = {}, where: incomingWhere }) {
|
4
4
|
const collectionConfig = this.payload.collections[collection].config;
|
5
5
|
const { docs } = await findMany({
|
@@ -17,4 +17,4 @@ export async function findOne({ collection, locale, req = {}, where: incomingWhe
|
|
17
17
|
return docs?.[0] || null;
|
18
18
|
}
|
19
19
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kT25lLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZE9uZUFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZywgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMuZC50cydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnkuanMnXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBmaW5kT25lPFQgZXh0ZW5kcyBUeXBlV2l0aElEPihcbiAgdGhpczogUG9zdGdyZXNBZGFwdGVyLFxuICB7IGNvbGxlY3Rpb24sIGxvY2FsZSwgcmVxID0ge30gYXMgUGF5bG9hZFJlcXVlc3QsIHdoZXJlOiBpbmNvbWluZ1doZXJlIH06IEZpbmRPbmVBcmdzLFxuKTogUHJvbWlzZTxUPiB7XG4gIGNvbnN0IGNvbGxlY3Rpb25Db25maWc6IFNhbml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VcsQ0FBQ1AsV0FBVyxDQUFDUSxNQUFNO0lBRS9GLE1BQU0sRUFBRUMsSUFBSSxFQUFFLEdBQUcsTUFBTVgsU0FBUztRQUM5QlksU0FBUyxJQUFJO1FBQ2JDLFFBQVFOLGlCQUFpQk0sTUFBTTtRQUMvQkMsT0FBTztRQUNQWDtRQUNBWSxNQUFNO1FBQ05DLFlBQVk7UUFDWlo7UUFDQWEsTUFBTUM7UUFDTkMsV0FBV3BCLFlBQVlHO1FBQ3ZCRyxPQUFPQztJQUNUO0lBRUEsT0FBT0ssTUFBTSxDQUFDLEVBQUUsSUFBSTtBQUN0QiJ9
|
package/dist/findVersions.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { buildVersionCollectionFields } from 'payload/versions';
|
2
2
|
import toSnakeCase from 'to-snake-case';
|
3
|
-
import { findMany } from './find/findMany';
|
3
|
+
import { findMany } from './find/findMany.js';
|
4
4
|
export const findVersions = async function findVersions({ collection, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
|
5
5
|
const collectionConfig = this.payload.collections[collection].config;
|
6
6
|
const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
|
@@ -21,4 +21,4 @@ export const findVersions = async function findVersions({ collection, limit, loc
|
|
21
21
|
});
|
22
22
|
};
|
23
23
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkVmVy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ksQ0FBQyxDQUFDLEVBQUVsQixZQUFZRyxZQUFZLEVBQUUsQ0FBQztJQUNqRCxNQUFNZ0IsU0FBU3BCLDZCQUE2QmM7SUFFNUMsT0FBT1osU0FBUztRQUNkbUIsU0FBUyxJQUFJO1FBQ2JEO1FBQ0FmO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FRO1FBQ0FOO0lBQ0Y7QUFDRixFQUFDIn0=
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { DatabaseAdapterObj } from 'payload/database';
|
2
|
-
import type { Args, PostgresAdapter } from './types';
|
3
|
-
export type { MigrateDownArgs, MigrateUpArgs } from './types';
|
2
|
+
import type { Args, PostgresAdapter } from './types.d.ts';
|
3
|
+
export type { MigrateDownArgs, MigrateUpArgs } from './types.d.ts';
|
4
4
|
export declare function postgresAdapter(args: Args): DatabaseAdapterObj<PostgresAdapter>;
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAM1D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAM1D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAiCzD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAElE,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAoE/E"}
|
package/dist/index.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1
1
|
import fs from 'fs';
|
2
2
|
import path from 'path';
|
3
3
|
import { createDatabaseAdapter } from 'payload/database';
|
4
|
-
import { connect } from './connect';
|
5
|
-
import { create } from './create';
|
6
|
-
import { createGlobal } from './createGlobal';
|
7
|
-
import { createGlobalVersion } from './createGlobalVersion';
|
8
|
-
import { createMigration } from './createMigration';
|
9
|
-
import { createVersion } from './createVersion';
|
10
|
-
import { deleteMany } from './deleteMany';
|
11
|
-
import { deleteOne } from './deleteOne';
|
12
|
-
import { deleteVersions } from './deleteVersions';
|
13
|
-
import { destroy } from './destroy';
|
14
|
-
import { find } from './find';
|
15
|
-
import { findGlobal } from './findGlobal';
|
16
|
-
import { findGlobalVersions } from './findGlobalVersions';
|
17
|
-
import { findOne } from './findOne';
|
18
|
-
import { findVersions } from './findVersions';
|
19
|
-
import { init } from './init';
|
20
|
-
import { migrate } from './migrate';
|
21
|
-
import { migrateDown } from './migrateDown';
|
22
|
-
import { migrateFresh } from './migrateFresh';
|
23
|
-
import { migrateRefresh } from './migrateRefresh';
|
24
|
-
import { migrateReset } from './migrateReset';
|
25
|
-
import { migrateStatus } from './migrateStatus';
|
26
|
-
import { queryDrafts } from './queryDrafts';
|
27
|
-
import { beginTransaction } from './transactions/beginTransaction';
|
28
|
-
import { commitTransaction } from './transactions/commitTransaction';
|
29
|
-
import { rollbackTransaction } from './transactions/rollbackTransaction';
|
30
|
-
import { updateOne } from './update';
|
31
|
-
import { updateGlobal } from './updateGlobal';
|
32
|
-
import { updateGlobalVersion } from './updateGlobalVersion';
|
33
|
-
import { updateVersion } from './updateVersion';
|
4
|
+
import { connect } from './connect.js';
|
5
|
+
import { create } from './create.js';
|
6
|
+
import { createGlobal } from './createGlobal.js';
|
7
|
+
import { createGlobalVersion } from './createGlobalVersion.js';
|
8
|
+
import { createMigration } from './createMigration.js';
|
9
|
+
import { createVersion } from './createVersion.js';
|
10
|
+
import { deleteMany } from './deleteMany.js';
|
11
|
+
import { deleteOne } from './deleteOne.js';
|
12
|
+
import { deleteVersions } from './deleteVersions.js';
|
13
|
+
import { destroy } from './destroy.js';
|
14
|
+
import { find } from './find.js';
|
15
|
+
import { findGlobal } from './findGlobal.js';
|
16
|
+
import { findGlobalVersions } from './findGlobalVersions.js';
|
17
|
+
import { findOne } from './findOne.js';
|
18
|
+
import { findVersions } from './findVersions.js';
|
19
|
+
import { init } from './init.js';
|
20
|
+
import { migrate } from './migrate.js';
|
21
|
+
import { migrateDown } from './migrateDown.js';
|
22
|
+
import { migrateFresh } from './migrateFresh.js';
|
23
|
+
import { migrateRefresh } from './migrateRefresh.js';
|
24
|
+
import { migrateReset } from './migrateReset.js';
|
25
|
+
import { migrateStatus } from './migrateStatus.js';
|
26
|
+
import { queryDrafts } from './queryDrafts.js';
|
27
|
+
import { beginTransaction } from './transactions/beginTransaction.js';
|
28
|
+
import { commitTransaction } from './transactions/commitTransaction.js';
|
29
|
+
import { rollbackTransaction } from './transactions/rollbackTransaction.js';
|
30
|
+
import { updateOne } from './update.js';
|
31
|
+
import { updateGlobal } from './updateGlobal.js';
|
32
|
+
import { updateGlobalVersion } from './updateGlobalVersion.js';
|
33
|
+
import { updateVersion } from './updateVersion.js';
|
34
34
|
export function postgresAdapter(args) {
|
35
35
|
function adapter({ payload }) {
|
36
36
|
const migrationDir = findMigrationDir(args.migrationDir);
|
@@ -128,4 +128,4 @@ export function postgresAdapter(args) {
|
|
128
128
|
return srcDir;
|
129
129
|
}
|
130
130
|
|
131
|
-
//# sourceMappingURL=data:application/json;base64,
|
131
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuaW1wb3J0IHR5cGUgeyBEYXRhYmFzZUFkYXB0ZXJPYmogfSBmcm9tICdwYXlsb2FkL2RhdG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JQUVBLElBQUk1RCxHQUFHOEQsVUFBVSxDQUFDRCxxQkFBcUI7UUFDckMsT0FBT0E7SUFDVDtJQUVBLE9BQU9IO0FBQ1QifQ==
|
package/dist/init.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable no-param-reassign */ import { pgEnum, pgSchema, pgTable } from 'drizzle-orm/pg-core';
|
2
2
|
import { buildVersionCollectionFields, buildVersionGlobalFields } from 'payload/versions';
|
3
3
|
import toSnakeCase from 'to-snake-case';
|
4
|
-
import { buildTable } from './schema/build';
|
4
|
+
import { buildTable } from './schema/build.js';
|
5
5
|
export const init = async function init() {
|
6
6
|
if (this.schemaName) {
|
7
7
|
this.pgSchema = pgSchema(this.schemaName);
|
@@ -73,4 +73,4 @@ export const init = async function init() {
|
|
73
73
|
});
|
74
74
|
};
|
75
75
|
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbml0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEluaXQgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgcGdFbnVtLCBwZ1NjaGVtYSwgcGdUYWJsZSB9IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5pbXBvcnQgeyBidWlsZFZlcnNpb25Db2xsZWN0aW9uRmllbGRzLCBidWlsZFZlcnNpb25HbG9iYWxGaWVsZHMgfSBmcm9tICdwYXlsb2FkL3ZlcnNpb25zJ1xuaW1wb3J0IHRvU25ha2VDYXNlIGZyb20gJ3RvLXNuYWtlLWNhc2UnXG5c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2lCO1FBQ25DLE1BQU1mLFlBQVloQixZQUFZK0IsT0FBT2QsSUFBSTtRQUV6Q2hCLFdBQVc7WUFDVGlCLFNBQVMsSUFBSTtZQUNiQyxjQUFjO1lBQ2RDLG9CQUFvQjtZQUNwQkMsWUFBWTtZQUNaQyxnQkFBZ0IsQ0FBQyxDQUFDUyxRQUFRUixVQUFVQztZQUNwQ0MsZUFBZTtZQUNmQyxRQUFRSyxPQUFPTCxNQUFNO1lBQ3JCVjtZQUNBVyxZQUFZO1FBQ2Q7UUFFQSxJQUFJSSxPQUFPUixRQUFRLEVBQUU7WUFDbkIsTUFBTUssb0JBQW9CLENBQUMsQ0FBQyxFQUFFWixVQUFVLEVBQUUsQ0FBQztZQUMzQyxNQUFNYSxnQkFBZ0I5Qix5QkFBeUJnQztZQUUvQzlCLFdBQVc7Z0JBQ1RpQixTQUFTLElBQUk7Z0JBQ2JDLGNBQWM7Z0JBQ2RDLG9CQUFvQjtnQkFDcEJDLFlBQVk7Z0JBQ1pDLGdCQUFnQixDQUFDLENBQUNTLE9BQU9SLFFBQVEsRUFBRUM7Z0JBQ25DQyxlQUFlO2dCQUNmQyxRQUFRRztnQkFDUmIsV0FBV1k7Z0JBQ1hELFlBQVk7WUFDZDtRQUNGO0lBQ0Y7QUFDRixFQUFDIn0=
|
package/dist/migrate.d.ts
CHANGED
package/dist/migrate.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAMnD,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DlE"}
|
package/dist/migrate.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/* eslint-disable no-restricted-syntax, no-await-in-loop */ import { commitTransaction, initTransaction, killTransaction, readMigrationFiles } from 'payload/database';
|
2
2
|
import prompts from 'prompts';
|
3
|
-
import { createMigrationTable } from './utilities/createMigrationTable';
|
4
|
-
import { migrationTableExists } from './utilities/migrationTableExists';
|
5
|
-
import { parseError } from './utilities/parseError';
|
3
|
+
import { createMigrationTable } from './utilities/createMigrationTable.js';
|
4
|
+
import { migrationTableExists } from './utilities/migrationTableExists.js';
|
5
|
+
import { parseError } from './utilities/parseError.js';
|
6
6
|
export async function migrate() {
|
7
7
|
const { payload } = this;
|
8
8
|
const migrationFiles = await readMigrationFiles({
|
@@ -94,4 +94,4 @@ async function runMigrationFile(payload, migration, batch) {
|
|
94
94
|
}
|
95
95
|
}
|
96
96
|
|
97
|
-
//# sourceMappingURL=data:application/json;base64,
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1hd2FpdC1pbi1sb29wICovXG5pbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuaW1wb3J0IHR5cGUgeyBNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7XG4gIGNvbW1pdFRyYW5zYWN0aW9uLFxuICBpbml0VHJhbnNhY3Rpb24sXG4gIGtpbGxUcmFuc2FjdGlvbixcbiAgcmVhZE1pZ3JhdGlvbkZpbGVzLFxufSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHByb21wdHMgZnJvbSAncH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7UUFDckIsTUFBTXBELGdCQUFnQjRDO1FBQ3RCckMsUUFBUUcsTUFBTSxDQUFDMkMsS0FBSyxDQUFDO1lBQ25CRDtZQUNBeEMsS0FBS1AsV0FBVytDLEtBQUssQ0FBQyx3QkFBd0IsRUFBRWpCLFVBQVVSLElBQUksQ0FBQyxDQUFDO1FBQ2xFO0lBQ0Y7QUFDRiJ9
|
package/dist/migrateDown.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrateDown.d.ts","sourceRoot":"","sources":["../src/migrateDown.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"migrateDown.d.ts","sourceRoot":"","sources":["../src/migrateDown.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAKnD,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDtE"}
|
package/dist/migrateDown.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable no-restricted-syntax, no-await-in-loop */ import { commitTransaction, getMigrations, initTransaction, killTransaction, readMigrationFiles } from 'payload/database';
|
2
|
-
import { migrationTableExists } from './utilities/migrationTableExists';
|
3
|
-
import { parseError } from './utilities/parseError';
|
2
|
+
import { migrationTableExists } from './utilities/migrationTableExists.js';
|
3
|
+
import { parseError } from './utilities/parseError.js';
|
4
4
|
export async function migrateDown() {
|
5
5
|
const { payload } = this;
|
6
6
|
const migrationFiles = await readMigrationFiles({
|
@@ -60,4 +60,4 @@ export async function migrateDown() {
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlRG93bi50cyJdLCJzb3VyY2VzQ29udGVudCI6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UUsT0FBT08sS0FBYztZQUNyQixNQUFNaEMsZ0JBQWdCeUI7WUFFdEJwQixRQUFRSyxNQUFNLENBQUN1QixLQUFLLENBQUM7Z0JBQ25CRDtnQkFDQXBCLEtBQUtULFdBQVc2QixLQUFLLENBQUMscUJBQXFCLEVBQUVmLGNBQWNHLElBQUksQ0FBQyxlQUFlLENBQUM7WUFDbEY7WUFDQWMsUUFBUUMsSUFBSSxDQUFDO1FBQ2Y7SUFDRjtBQUNGIn0=
|
package/dist/migrateFresh.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrateFresh.d.ts","sourceRoot":"","sources":["../src/migrateFresh.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"migrateFresh.d.ts","sourceRoot":"","sources":["../src/migrateFresh.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAInD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,eAAe,EACrB,EAAE,kBAA0B,EAAE;;CAAA,GAC7B,OAAO,CAAC,IAAI,CAAC,CAgEf"}
|
package/dist/migrateFresh.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
2
2
|
import { commitTransaction, initTransaction, killTransaction, readMigrationFiles } from 'payload/database';
|
3
3
|
import prompts from 'prompts';
|
4
|
-
import { parseError } from './utilities/parseError';
|
4
|
+
import { parseError } from './utilities/parseError.js';
|
5
5
|
/**
|
6
6
|
* Drop the current database and run all migrate up functions
|
7
7
|
*/ export async function migrateFresh({ forceAcceptWarning = false }) {
|
@@ -69,4 +69,4 @@ import { parseError } from './utilities/parseError';
|
|
69
69
|
}
|
70
70
|
}
|
71
71
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2Vz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NNUIsa0JBQWtCNEI7WUFFeEJwQixRQUFRVSxNQUFNLENBQUNDLElBQUksQ0FBQztnQkFBRUMsS0FBSyxDQUFDLFdBQVcsRUFBRVMsVUFBVWxCLElBQUksQ0FBQyxFQUFFLEVBQUVvQixLQUFLQyxHQUFHLEtBQUtGLE1BQU0sR0FBRyxDQUFDO1lBQUM7UUFDdEYsRUFBRSxPQUFPUSxLQUFjO1lBQ3JCLE1BQU1wQyxnQkFBZ0IwQjtZQUN0QnBCLFFBQVFVLE1BQU0sQ0FBQ3FCLEtBQUssQ0FBQztnQkFDbkJEO2dCQUNBbEIsS0FBS2YsV0FBV2lDLEtBQUssQ0FBQyx3QkFBd0IsRUFBRVQsVUFBVWxCLElBQUksQ0FBQyxjQUFjLENBQUM7WUFDaEY7UUFDRjtJQUNGO0FBQ0YifQ==
|
package/dist/migrateRefresh.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrateRefresh.d.ts","sourceRoot":"","sources":["../src/migrateRefresh.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"migrateRefresh.d.ts","sourceRoot":"","sources":["../src/migrateRefresh.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAKnD;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,iBAsFzD"}
|
package/dist/migrateRefresh.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable no-restricted-syntax, no-await-in-loop */ import { commitTransaction, getMigrations, initTransaction, killTransaction, readMigrationFiles } from 'payload/database';
|
2
|
-
import { migrationTableExists } from './utilities/migrationTableExists';
|
3
|
-
import { parseError } from './utilities/parseError';
|
2
|
+
import { migrationTableExists } from './utilities/migrationTableExists.js';
|
3
|
+
import { parseError } from './utilities/parseError.js';
|
4
4
|
/**
|
5
5
|
* Run all migration down functions before running up
|
6
6
|
*/ export async function migrateRefresh() {
|
@@ -99,4 +99,4 @@ import { parseError } from './utilities/parseError';
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
102
|
-
//# sourceMappingURL=data:application/json;base64,
|
102
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlUmVmcmVzaC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1yZXN0cmljdGVkLXN5bnRheCwgbm8tYXdhaXQtaW4tbG9vcCAqL1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7XG4gIGNvbW1pdFRyYW5zYWN0aW9uLFxuICBnZXRNaWdyYXRpb25zLFxuICBpbml0VHJhbnNhY3Rpb24sXG4gIGtpbGxUcmFuc2FjdGlvbixcbiAgcmVhZE1pZ3JhdGlvbkZpbGVzLFxufSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMuZC50cydcblxuaW1wb3J0IHsgbWlncmF0aW9uVGFibGVFeGlzdHMgfSBmcm9tICcuL3V0aWxpdGllcy9taWdyYXRpb25UYWJsZUV4aXN0cy5qcydcbmltcG9ydCB7IHBhcnNlRXJyb3IgfSBmcm9tICcuL3V0aWxpdGllcy9wYXJzZUVycm9yLmpzJ1xuXG4vKipcbiAqIFJ1biBhbGwgbWlncmF0aW9uIGRvd24gZnVuY3Rpb25zIGJlZm9yZSBydW5uaW5nIHVwXG4gKi9cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBtaWdyYXRlUmVmcmVzaCh0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIpIHtcbiAgY29uc3QgeyBwYXlsb2FkIH0gPSB0aGlzXG4gIGNvbnN0IG1p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VUksSUFBSTtvQkFDcEJtQixVQUFVO2dCQUNaO2dCQUNBekI7WUFDRjtZQUNBLE1BQU1oQixrQkFBa0JnQjtZQUV4QlIsUUFBUUssTUFBTSxDQUFDQyxJQUFJLENBQUM7Z0JBQUVDLEtBQUssQ0FBQyxXQUFXLEVBQUVHLFVBQVVJLElBQUksQ0FBQyxFQUFFLEVBQUVHLEtBQUtDLEdBQUcsS0FBS0YsTUFBTSxHQUFHLENBQUM7WUFBQztRQUN0RixFQUFFLE9BQU9VLEtBQWM7WUFDckIsTUFBTS9CLGdCQUFnQmE7WUFDdEJSLFFBQVFLLE1BQU0sQ0FBQ3NCLEtBQUssQ0FBQztnQkFDbkJEO2dCQUNBbkIsS0FBS1QsV0FBVzRCLEtBQUssQ0FBQyx3QkFBd0IsRUFBRWhCLFVBQVVJLElBQUksQ0FBQyxlQUFlLENBQUM7WUFDakY7UUFDRjtJQUNGO0FBQ0YifQ==
|
package/dist/migrateReset.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrateReset.d.ts","sourceRoot":"","sources":["../src/migrateReset.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"migrateReset.d.ts","sourceRoot":"","sources":["../src/migrateReset.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAInD;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsEvE"}
|