@payloadcms/db-postgres 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAW/C,eAAO,MAAM,OAAO,EAAE,OA+FrB,CAAA"}
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAU/C,eAAO,MAAM,OAAO,EAAE,OAiGrB,CAAA"}
package/dist/connect.js CHANGED
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "connect", {
8
8
  return connect;
9
9
  }
10
10
  });
11
- const _utils = require("drizzle-kit/utils");
12
11
  const _drizzleorm = require("drizzle-orm");
13
12
  const _nodepostgres = require("drizzle-orm/node-postgres");
14
13
  const _pgcore = require("drizzle-orm/pg-core");
@@ -43,8 +42,9 @@ const connect = async function connect(payload) {
43
42
  }
44
43
  // Only push schema if not in production
45
44
  if (process.env.NODE_ENV === 'production' || process.env.PAYLOAD_MIGRATING === 'true' || this.push === false) return;
45
+ const { pushSchema } = require('drizzle-kit/utils');
46
46
  // This will prompt if clarifications are needed for Drizzle to push new schema
47
- const { apply, hasDataLoss, statementsToExecute, warnings } = await (0, _utils.pushSchema)(this.schema, this.drizzle);
47
+ const { apply, hasDataLoss, statementsToExecute, warnings } = await pushSchema(this.schema, this.drizzle);
48
48
  if (warnings.length) {
49
49
  let message = `Warnings detected during schema push: \n\n${warnings.join('\n')}\n\n`;
50
50
  if (hasDataLoss) {
@@ -88,4 +88,4 @@ const connect = async function connect(payload) {
88
88
  }
89
89
  };
90
90
 
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25uZWN0LnRzIl0sInNvdXJjZXNDb250ZW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QVFqQixNQUFNLEVBQUU7UUFDbkIsTUFBTSxJQUFJLENBQUNyQixPQUFPLENBQUMyQyxNQUFNLENBQUNiLGtCQUFrQmMsTUFBTSxDQUFDO1lBQ2pEbEIsTUFBTTtZQUNOTyxPQUFPO1FBQ1Q7SUFDRixPQUFPO1FBQ0wsTUFBTSxJQUFJLENBQUNqQyxPQUFPLENBQ2Y2QyxNQUFNLENBQUNmLGtCQUNQZ0IsR0FBRyxDQUFDO1lBQ0hULFlBQVksSUFBSVU7UUFDbEIsR0FDQ04sS0FBSyxDQUFDQyxJQUFBQSxjQUFFLEVBQUNaLGlCQUFpQkcsS0FBSyxFQUFFO0lBQ3RDO0FBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAoDvD,eAAO,MAAM,eAAe,EAAE,eA0E7B,CAAA"}
1
+ {"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAmDvD,eAAO,MAAM,eAAe,EAAE,eA4E7B,CAAA"}
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "createMigration", {
8
8
  return createMigration;
9
9
  }
10
10
  });
11
- const _utils = require("drizzle-kit/utils");
12
11
  const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
13
12
  const _prompts = /*#__PURE__*/ _interop_require_default(require("prompts"));
14
13
  function _interop_require_default(obj) {
@@ -52,6 +51,7 @@ const createMigration = async function createMigration({ migrationName, payload
52
51
  if (!_fs.default.existsSync(dir)) {
53
52
  _fs.default.mkdirSync(dir);
54
53
  }
54
+ const { generateDrizzleJson, generateMigration } = require('drizzle-kit/utils');
55
55
  const [yyymmdd, hhmmss] = new Date().toISOString().split('T');
56
56
  const formattedDate = yyymmdd.replace(/\D/g, '');
57
57
  const formattedTime = hhmmss.split('.')[0].replace(/\D/g, '');
@@ -65,9 +65,9 @@ const createMigration = async function createMigration({ migrationName, payload
65
65
  const latestSnapshotJSON = JSON.parse(_fs.default.readFileSync(`${dir}/${latestSnapshot}`, 'utf8'));
66
66
  drizzleJsonBefore = latestSnapshotJSON;
67
67
  }
68
- const drizzleJsonAfter = (0, _utils.generateDrizzleJson)(this.schema);
69
- const sqlStatementsUp = await (0, _utils.generateMigration)(drizzleJsonBefore, drizzleJsonAfter);
70
- const sqlStatementsDown = await (0, _utils.generateMigration)(drizzleJsonAfter, drizzleJsonBefore);
68
+ const drizzleJsonAfter = generateDrizzleJson(this.schema);
69
+ const sqlStatementsUp = await generateMigration(drizzleJsonBefore, drizzleJsonAfter);
70
+ const sqlStatementsDown = await generateMigration(drizzleJsonAfter, drizzleJsonBefore);
71
71
  if (!sqlStatementsUp.length && !sqlStatementsDown.length) {
72
72
  const { confirm: shouldCreateBlankMigration } = await (0, _prompts.default)({
73
73
  name: 'confirm',
@@ -92,4 +92,4 @@ const createMigration = async function createMigration({ migrationName, payload
92
92
  });
93
93
  };
94
94
 
95
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVNaWdyYXRpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcmVzdHJpY3RlZC1zeW50YXgsIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgRHJpenpsZVNuYXBzaG90SlNPTiB9IGZyb20gJ2RyaXp6bGUta2l0L3V0aWxzJ1xuaW1wb3J0IHR5cGUgeyBDcmVhdGVNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgeyBnZW5lcmF0ZURyaXp6bGVKc29uLCBnZW5lcmF0ZU1pZ3JhdGlvbiB9IGZyb20gJ2RyaX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BQUksQ0FBQztRQUFFQyxLQUFLLENBQUMscUJBQXFCLEVBQUVsQyxTQUFTLEdBQUcsQ0FBQztJQUFDO0FBQ25FIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DlE"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DlE"}
package/dist/migrate.js CHANGED
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "migrate", {
8
8
  return migrate;
9
9
  }
10
10
  });
11
- const _utils = require("drizzle-kit/utils");
12
11
  const _database = require("payload/database");
13
12
  const _prompts = /*#__PURE__*/ _interop_require_default(require("prompts"));
14
13
  const _createMigrationTable = require("./utilities/createMigrationTable");
@@ -72,12 +71,13 @@ async function migrate() {
72
71
  }
73
72
  }
74
73
  async function runMigrationFile(payload, migration, batch) {
74
+ const { generateDrizzleJson } = require('drizzle-kit/utils');
75
75
  const start = Date.now();
76
76
  payload.logger.info({
77
77
  msg: `Migrating: ${migration.name}`
78
78
  });
79
79
  const pgAdapter = payload.db;
80
- const drizzleJSON = (0, _utils.generateDrizzleJson)(pgAdapter.schema);
80
+ const drizzleJSON = generateDrizzleJson(pgAdapter.schema);
81
81
  try {
82
82
  await migration.up({
83
83
  payload
@@ -101,4 +101,4 @@ async function runMigrationFile(payload, migration, batch) {
101
101
  }
102
102
  }
103
103
 
104
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL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QUNGLEtBQUssQ0FBQyx3QkFBd0IsRUFBRWhCLFVBQVVSLElBQUksQ0FBQyxDQUFDO1FBQ2xFO0lBQ0Y7QUFDRiJ9
package/dist/reference.js CHANGED
@@ -6,7 +6,6 @@
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- const _utils = require("drizzle-kit/utils");
10
9
  const _nodepostgres = require("drizzle-orm/node-postgres");
11
10
  const _pg = require("pg");
12
11
  function _getRequireWildcardCache(nodeInterop) {
@@ -49,22 +48,24 @@ function _interop_require_wildcard(obj, nodeInterop) {
49
48
  return newObj;
50
49
  }
51
50
  async function generateUsage() {
51
+ const { generateDrizzleJson, generateMigration } = require('drizzle-kit/utils');
52
52
  // @ts-expect-error Just TypeScript being broken // TODO: Open TypeScript issue
53
53
  const schema = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./data/users")));
54
54
  // @ts-expect-error Just TypeScript being broken // TODO: Open TypeScript issue
55
55
  const schemaAfter = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./data/users-after")));
56
- const drizzleJsonBefore = (0, _utils.generateDrizzleJson)(schema);
57
- const drizzleJsonAfter = (0, _utils.generateDrizzleJson)(schemaAfter);
58
- const sqlStatements = await (0, _utils.generateMigration)(drizzleJsonBefore, drizzleJsonAfter);
56
+ const drizzleJsonBefore = generateDrizzleJson(schema);
57
+ const drizzleJsonAfter = generateDrizzleJson(schemaAfter);
58
+ const sqlStatements = await generateMigration(drizzleJsonBefore, drizzleJsonAfter);
59
59
  console.log(sqlStatements);
60
60
  }
61
61
  async function pushUsage() {
62
+ const { pushSchema } = require('drizzle-kit/utils');
62
63
  // @ts-expect-error Just TypeScript being broken // TODO: Open TypeScript issue
63
64
  const schemaAfter = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./data/users-after")));
64
65
  const db = (0, _nodepostgres.drizzle)(new _pg.Pool({
65
66
  connectionString: ''
66
67
  }));
67
- const response = await (0, _utils.pushSchema)(schemaAfter, db);
68
+ const response = await pushSchema(schemaAfter, db);
68
69
  console.log('\n');
69
70
  console.log('hasDataLoss: ', response.hasDataLoss);
70
71
  console.log('warnings: ', response.warnings);
@@ -73,4 +74,4 @@ async function pushUsage() {
73
74
  process.exit(0);
74
75
  }
75
76
 
76
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9yZWZlcmVuY2UudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdHlwZSBHZW5lcmF0ZU1pZ3JhdGlvbiA9IChiZWZvcmU6IERyaXp6bGVTbmFwc2hvdEpTT04sIGFmdGVyOiBEcml6emxlU25hcHNob3RKU09OKSA9PiBzdHJpbmdbXVxuXG4vLyB0eXBlIEdlbmVyYXRlRHJpenpsZUpTT04gPSAoc2NoZW1hOiBEcml6emxlU2NoZW1hRXhwb3J0cykgPT4gRHJpenpsZVNuYXBzaG90SlNPTlxuXG4vLyB0eXBlIFB1c2hEaWZmID0gKHNjaGVtYTogRHJpenpsZVNjaGVtYUV4cG9ydHMpID0+IFByb21pc2U8eyB3YXJuaW5nczogc3RyaW5nW10sIGFwcGx5OiAoKSA9PiBQcm9taXNlPHZvaWQ+IH0+XG5cbi8vIGRyaXp6bGUta2l0QHV0aWxzXG5cbmltcG9ydCB7IGdlbmVyYXRlRHJpenpsZUpzb24sIGdlbmVyYXRlTWlncmF0aW9uLCBwdXNoU2NoZW1hIH0gZnJvbSAnZHJpenpsZS1raXQvdXRpbHMnXG5pbXBvcnQgeyBkcml6emxlIH0gZnJvbSAnZHJpenpsZS1vcm0vbm9kZS1wb3N0Z3JlcydcbmltcG9ydCB7IFBvb2wgfSBmcm9tICdwZydcblxuYXN5bmMgZnVuY3Rpb24gZ2VuZXJhdGVVc2FnZSgpIHtcbiAgLy8gQHRzLWV4cGVjdC1lcnJvciBKdXN0IFR5cGVTY3JpcHQgYmVpbmcgYnJva2VuIC8vIFRPRE86IE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CxRQUFRQyxHQUFHLENBQUMsY0FBY08sU0FBU0UsUUFBUTtJQUMzQ1YsUUFBUUMsR0FBRyxDQUFDLGdCQUFnQk8sU0FBU0csbUJBQW1CO0lBRXhELE1BQU1ILFNBQVNJLEtBQUs7SUFFcEJDLFFBQVFDLElBQUksQ0FBQztBQUNmIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",