@payloadcms/db-postgres 0.8.6 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +5 -52
  3. package/dist/count.d.ts.map +1 -1
  4. package/dist/count.js +3 -3
  5. package/dist/createMigration.d.ts.map +1 -1
  6. package/dist/createMigration.js +10 -4
  7. package/dist/find/buildFindManyArgs.d.ts.map +1 -1
  8. package/dist/find/buildFindManyArgs.js +2 -1
  9. package/dist/find/findMany.d.ts.map +1 -1
  10. package/dist/find/findMany.js +3 -3
  11. package/dist/find/traverseFields.d.ts +2 -1
  12. package/dist/find/traverseFields.d.ts.map +1 -1
  13. package/dist/find/traverseFields.js +9 -3
  14. package/dist/init.js +3 -2
  15. package/dist/migrate.js +3 -3
  16. package/dist/migrateDown.js +2 -2
  17. package/dist/migrateRefresh.js +2 -2
  18. package/dist/migrateReset.js +3 -3
  19. package/dist/migrateStatus.js +2 -2
  20. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  21. package/dist/queries/getTableColumnFromPath.js +4 -3
  22. package/dist/queries/parseParams.d.ts.map +1 -1
  23. package/dist/queries/parseParams.js +3 -1
  24. package/dist/queries/sanitizeQueryValue.d.ts +2 -1
  25. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  26. package/dist/queries/sanitizeQueryValue.js +11 -2
  27. package/dist/schema/build.d.ts +10 -2
  28. package/dist/schema/build.d.ts.map +1 -1
  29. package/dist/schema/build.js +23 -6
  30. package/dist/schema/traverseFields.d.ts +6 -1
  31. package/dist/schema/traverseFields.d.ts.map +1 -1
  32. package/dist/schema/traverseFields.js +46 -17
  33. package/dist/transform/read/hasManyNumber.d.ts +2 -1
  34. package/dist/transform/read/hasManyNumber.d.ts.map +1 -1
  35. package/dist/transform/read/hasManyNumber.js +14 -4
  36. package/dist/transform/read/hasManyText.d.ts +2 -1
  37. package/dist/transform/read/hasManyText.d.ts.map +1 -1
  38. package/dist/transform/read/hasManyText.js +14 -4
  39. package/dist/transform/read/relationship.d.ts +2 -1
  40. package/dist/transform/read/relationship.d.ts.map +1 -1
  41. package/dist/transform/read/relationship.js +16 -7
  42. package/dist/transform/read/traverseFields.d.ts +5 -1
  43. package/dist/transform/read/traverseFields.d.ts.map +1 -1
  44. package/dist/transform/read/traverseFields.js +118 -85
  45. package/dist/transform/write/array.d.ts +6 -1
  46. package/dist/transform/write/array.d.ts.map +1 -1
  47. package/dist/transform/write/array.js +7 -3
  48. package/dist/transform/write/blocks.d.ts +6 -1
  49. package/dist/transform/write/blocks.d.ts.map +1 -1
  50. package/dist/transform/write/blocks.js +5 -3
  51. package/dist/transform/write/traverseFields.d.ts +6 -1
  52. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  53. package/dist/transform/write/traverseFields.js +40 -15
  54. package/dist/types.d.ts +9 -5
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/upsertRow/insertArrays.d.ts.map +1 -1
  57. package/dist/upsertRow/insertArrays.js +5 -2
  58. package/dist/utilities/migrationTableExists.d.ts +2 -2
  59. package/dist/utilities/migrationTableExists.d.ts.map +1 -1
  60. package/dist/utilities/migrationTableExists.js +10 -6
  61. package/dist/utilities/pushDevSchema.d.ts +9 -0
  62. package/dist/utilities/pushDevSchema.d.ts.map +1 -0
  63. package/dist/utilities/pushDevSchema.js +59 -0
  64. package/dist/utilities/requireDrizzleKit.d.ts +14 -0
  65. package/dist/utilities/requireDrizzleKit.d.ts.map +1 -0
  66. package/dist/utilities/requireDrizzleKit.js +13 -0
  67. package/package.json +6 -6
@@ -3,11 +3,12 @@ import type { PostgresAdapter } from '../types';
3
3
  type SanitizeQueryValueArgs = {
4
4
  adapter: PostgresAdapter;
5
5
  field: Field | TabAsField;
6
+ isUUID: boolean;
6
7
  operator: string;
7
8
  relationOrPath: string;
8
9
  val: any;
9
10
  };
10
- export declare const sanitizeQueryValue: ({ adapter, field, operator: operatorArg, relationOrPath, val, }: SanitizeQueryValueArgs) => {
11
+ export declare const sanitizeQueryValue: ({ adapter, field, isUUID, operator: operatorArg, relationOrPath, val, }: SanitizeQueryValueArgs) => {
11
12
  operator: string;
12
13
  value: unknown;
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,oEAM5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CAyF7D,CAAA"}
1
+ {"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAI7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,4EAO5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CAmG7D,CAAA"}
@@ -11,7 +11,8 @@ Object.defineProperty(exports, "sanitizeQueryValue", {
11
11
  const _errors = require("payload/errors");
12
12
  const _types = require("payload/types");
13
13
  const _utilities = require("payload/utilities");
14
- const sanitizeQueryValue = ({ adapter, field, operator: operatorArg, relationOrPath, val })=>{
14
+ const _uuid = require("uuid");
15
+ const sanitizeQueryValue = ({ adapter, field, isUUID, operator: operatorArg, relationOrPath, val })=>{
15
16
  let operator = operatorArg;
16
17
  let formattedValue = val;
17
18
  if (!(0, _types.fieldAffectsData)(field)) return {
@@ -53,6 +54,14 @@ const sanitizeQueryValue = ({ adapter, field, operator: operatorArg, relationOrP
53
54
  }
54
55
  if (field.type === 'number' && typeof formattedValue === 'string') {
55
56
  formattedValue = Number(val);
57
+ if (Number.isNaN(formattedValue)) {
58
+ formattedValue = null;
59
+ }
60
+ }
61
+ if (isUUID && typeof formattedValue === 'string') {
62
+ if (!(0, _uuid.validate)(val)) {
63
+ formattedValue = null;
64
+ }
56
65
  }
57
66
  if (field.type === 'date' && operator !== 'exists') {
58
67
  if (typeof val === 'string') {
@@ -97,4 +106,4 @@ const sanitizeQueryValue = ({ adapter, field, operator: operatorArg, relationOrP
97
106
  };
98
107
  };
99
108
 
100
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3Nhbml0aXplUXVlcnlWYWx1ZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBUElFcnJvciB9IGZyb20gJ3BheWxvYWQvZXJyb3JzJ1xuaW1wb3J0IHsgdHlwZSBGaWVsZCwgdHlwZSBUYWJBc0ZpZWxkLCBmaWVsZEFmZmVjdHNEYXRhIH0gZnJvbSAncGF5bG9hZC90eXBlcydcbmltcG9ydCB7IGNyZWF0ZUFycmF5RnJvbUNvbW1hRGVsaW5lYXRlZCB9IGZyb20gJ3BheWxvYWQvdXRpbGl0aWVzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIFNhbml0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O29CQUFVTSxPQUFPdUI7Z0JBQVU7WUFDdEM7UUFDRjtRQUVBLElBQUksT0FBTzFCLFFBQVEsVUFBVTtZQUMzQkMsaUJBQWlCLElBQUl1QixLQUFLeEI7UUFDNUI7SUFDRjtJQUVBLElBQUk7UUFBQztRQUFnQjtLQUFTLENBQUNlLFFBQVEsQ0FBQ3BCLE1BQU1TLElBQUksR0FBRztRQUNuRCxJQUFJSixRQUFRLFFBQVE7WUFDbEJDLGlCQUFpQjtRQUNuQjtJQUNGO0lBRUEsSUFBSSxhQUFhTixTQUFTQSxNQUFNZ0MsT0FBTyxJQUFJOUIsYUFBYSxZQUFZO1FBQ2xFQSxXQUFXO0lBQ2I7SUFFQSxJQUFJQSxhQUFhLFVBQVVBLGFBQWEsWUFBWUEsYUFBYSxjQUFjO1FBQzdFLE1BQU0sSUFBSStCLGdCQUFRLENBQ2hCLENBQUMsZUFBZSxFQUFFL0IsU0FBUyxzREFBc0QsQ0FBQztJQUV0RjtJQUVBLElBQUlBLGFBQWEsWUFBWTtRQUMzQkksaUJBQWlCLENBQUMsQ0FBQyxFQUFFQSxlQUFlLENBQUMsQ0FBQztJQUN4QztJQUVBLElBQUlKLGFBQWEsVUFBVTtRQUN6QkksaUJBQWlCQSxtQkFBbUIsVUFBVUEsbUJBQW1CO1FBQ2pFLElBQUlBLG1CQUFtQixPQUFPO1lBQzVCSixXQUFXO1FBQ2I7SUFDRjtJQUVBLE9BQU87UUFBRUE7UUFBVU0sT0FBT0Y7SUFBZTtBQUMzQyJ9
@@ -1,5 +1,5 @@
1
1
  import type { ForeignKeyBuilder, IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core';
2
- import { Field } from 'payload/types';
2
+ import type { Field } from 'payload/types';
3
3
  import type { GenericColumns, PostgresAdapter } from '../types';
4
4
  export type BaseExtraConfig = Record<string, (cols: GenericColumns) => ForeignKeyBuilder | IndexBuilder | UniqueConstraintBuilder>;
5
5
  type Args = {
@@ -19,12 +19,20 @@ type Args = {
19
19
  tableName: string;
20
20
  timestamps?: boolean;
21
21
  versions: boolean;
22
+ /**
23
+ * Tracks whether or not this table is built
24
+ * from the result of a localized array or block field at some point
25
+ */
26
+ withinLocalizedArrayOrBlock?: boolean;
22
27
  };
23
28
  type Result = {
29
+ hasLocalizedManyNumberField: boolean;
30
+ hasLocalizedManyTextField: boolean;
31
+ hasLocalizedRelationshipField: boolean;
24
32
  hasManyNumberField: 'index' | boolean;
25
33
  hasManyTextField: 'index' | boolean;
26
34
  relationsToBuild: Map<string, string>;
27
35
  };
28
- export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, }: Args) => Result;
36
+ export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, withinLocalizedArrayOrBlock, }: Args) => Result;
29
37
  export {};
30
38
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/schema/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAEf,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAoB,MAAM,eAAe,CAAA;AAevD,OAAO,KAAK,EAAE,cAAc,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAA;AAOrF,MAAM,MAAM,eAAe,GAAG,MAAM,CAClC,MAAM,EACN,CAAC,IAAI,EAAE,cAAc,KAAK,iBAAiB,GAAG,YAAY,GAAG,uBAAuB,CACrF,CAAA;AAED,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,CAA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AAiB,GAAG,YAAY,GAAG,uBAAuB,CACrF,CAAA;AAED,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAA;CACtC,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,2BAA2B,EAAE,OAAO,CAAA;IACpC,yBAAyB,EAAE,OAAO,CAAA;IAClC,6BAA6B,EAAE,OAAO,CAAA;IACtC,kBAAkB,EAAE,OAAO,GAAG,OAAO,CAAA;IACrC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CAAA;IACnC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,UAAU,qSAkBpB,IAAI,KAAG,MAwXT,CAAA"}
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "buildTable", {
8
8
  return buildTable;
9
9
  }
10
10
  });
11
- const _types = require("payload/types");
12
11
  const _drizzleorm = require("drizzle-orm");
13
12
  const _pgcore = require("drizzle-orm/pg-core");
13
+ const _types = require("payload/types");
14
14
  const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
15
+ const _createIndex = require("./createIndex");
15
16
  const _createTableName = require("./createTableName");
16
17
  const _parentIDColumnMap = require("./parentIDColumnMap");
17
18
  const _setColumnID = require("./setColumnID");
@@ -21,7 +22,7 @@ function _interop_require_default(obj) {
21
22
  default: obj
22
23
  };
23
24
  }
24
- const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions })=>{
25
+ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, withinLocalizedArrayOrBlock })=>{
25
26
  const rootTableName = incomingRootTableName || tableName;
26
27
  const columns = baseColumns;
27
28
  const indexes = {};
@@ -59,7 +60,8 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
59
60
  rootRelationsToBuild: rootRelationsToBuild || relationsToBuild,
60
61
  rootTableIDColType: rootTableIDColType || idColType,
61
62
  rootTableName,
62
- versions
63
+ versions,
64
+ withinLocalizedArrayOrBlock
63
65
  });
64
66
  if (timestamps) {
65
67
  columns.createdAt = (0, _pgcore.timestamp)('created_at', {
@@ -237,16 +239,28 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
237
239
  const relatedCollectionCustomIDType = relatedCollectionCustomID?.type;
238
240
  if (relatedCollectionCustomIDType === 'number') colType = 'numeric';
239
241
  if (relatedCollectionCustomIDType === 'text') colType = 'varchar';
240
- relationshipColumns[`${relationTo}ID`] = _parentIDColumnMap.parentIDColumnMap[colType](`${formattedRelationTo}_id`);
242
+ const colName = `${relationTo}ID`;
243
+ relationshipColumns[colName] = _parentIDColumnMap.parentIDColumnMap[colType](`${formattedRelationTo}_id`);
241
244
  relationExtraConfig[`${relationTo}IdFk`] = (cols)=>(0, _pgcore.foreignKey)({
242
245
  name: `${relationshipsTableName}_${(0, _tosnakecase.default)(relationTo)}_fk`,
243
246
  columns: [
244
- cols[`${relationTo}ID`]
247
+ cols[colName]
245
248
  ],
246
249
  foreignColumns: [
247
250
  adapter.tables[formattedRelationTo].id
248
251
  ]
249
252
  }).onDelete('cascade');
253
+ const indexName = [
254
+ colName
255
+ ];
256
+ if (hasLocalizedRelationshipField) {
257
+ indexName.push('locale');
258
+ }
259
+ relationExtraConfig[`${relationTo}IdIdx`] = (0, _createIndex.createIndex)({
260
+ name: indexName,
261
+ columnName: `${formattedRelationTo}_id`,
262
+ tableName: relationshipsTableName
263
+ });
250
264
  });
251
265
  relationshipsTable = adapter.pgSchema.table(relationshipsTableName, relationshipColumns, (cols)=>{
252
266
  const result = Object.entries(relationExtraConfig).reduce((config, [key, func])=>{
@@ -328,10 +342,13 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
328
342
  });
329
343
  adapter.relations[`relations_${tableName}`] = tableRelations;
330
344
  return {
345
+ hasLocalizedManyNumberField,
346
+ hasLocalizedManyTextField,
347
+ hasLocalizedRelationshipField,
331
348
  hasManyNumberField,
332
349
  hasManyTextField,
333
350
  relationsToBuild
334
351
  };
335
352
  };
336
353
 
337
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHtcbiAgRm9yZWlnbktleUJ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29sdW1ucyxcbiAgICAgICAgKGNvbHMpID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIEZvcmVpZ25LZXlCdWlsZGVyIHwgSW5kZXhCdWlsZGVyPiA9IE9iamVjdC5lbnRyaWVzKFxuICAgICAgICAgICAgcmVsYXRpb25FeHRyYUNvbmZpZyxcbiAgICAgICAgICApLnJlZHVjZShcbiAgICAgICAgICAgIChjb25maWcsIFtrZXksIGZ1bmNdKSA9PiB7XG4gICAgICAgICAgICAgIGNvbmZpZ1trZXldID0gZnVuYyhjb2xzKVxuICAgICAgICAgICAgICByZXR1cm4gY29uZmlnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBvcmRlcjogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fb3JkZXJfaWR4YCkub24oY29scy5vcmRlciksXG4gICAgICAgICAgICAgIHBhcmVudEZrOiBmb3JlaWduS2V5KHtcbiAgICAgICAgICAgICAgICBuYW1lOiBgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9wYXJlbnRfZmtgLFxuICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtjb2xzLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgZm9yZWlnbkNvbHVtbnM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICAgIH0pLm9uRGVsZXRlKCdjYXNjYWRlJyksXG4gICAgICAgICAgICAgIHBhcmVudElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGFyZW50X2lkeGApLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICAgICAgcGF0aElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGF0aF9pZHhgKS5vbihjb2xzLnBhdGgpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApXG5cbiAgICAgICAgICBpZiAoaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIHtcbiAgICAgICAgICAgIHJlc3VsdC5sb2NhbGVJZHggPSBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9sb2NhbGVfaWR4YCkub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9LFxuICAgICAgKVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gY3JlYXRlVGFibGVOYW1lKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjb25maWc6IGFkYXB0ZXIucGF5bG9hZC5jb2xsZWN0aW9uc1tyZWxhdGlvblRvXS5jb25maWcsXG4gICAgICAgICAgICB0aHJvd1ZhbGlkYXRpb25FcnJvcjogdHJ1ZSxcbiAgICAgICAgICB9KVxuICAgICAgICAgIGNvbnN0IGlkQ29sdW1u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Y29uZmlnOiBSZWNvcmQ8c3RyaW5nLCBGb3JlaWduS2V5QnVpbGRlciB8IEluZGV4QnVpbGRlcj4gPSB7XG4gICAgICAgIG9yZGVyUGFyZW50SWR4OiBpbmRleChgJHtudW1iZXJzVGFibGVOYW1lfV9vcmRlcl9wYXJlbnRfaWR4YCkub24oY29scy5vcmRlciwgY29scy5wYXJlbnQpLFxuICAgICAgICBwYXJlbnRGazogZm9yZWlnbktleSh7XG4gICAgICAgICAgbmFtZTogYCR7bnVtYmVyc1RhYmxlTmFtZX1fcGFyZW50X2ZrYCxcbiAgICAgICAgICBjb2x1bW5zOiBbY29scy5wYXJlbnRdLFxuICAgICAgICAgIGZvcmVpZ25Db2x1bW5zOiBbdGFibGUuaWRdLFxuICAgICAgICB9KS5vbkRlbGV0ZSgnY2FzY2FkZScpLFxuICAgICAgfVxuXG4gICAgICBpZiAoaGFzTWFueU51bWJlckZpZWxkID09PSAnaW5kZXgnKSB7XG4gICAgICAgIGNvbmZpZy5udW1iZXJJZHggPSBpbmRleChgJHtudW1iZXJzVGFibGVOYW1lfV9udW1iZXJfaWR4YCkub24oY29scy5udW1iZXIpXG4gICAgICB9XG5cbiAgICAgIGlmIChoYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQpIHtcbiAgICAgICAgY29uZmlnLmxvY2FsZVBhcmVudCA9IGluZGV4KGAke251bWJlcnNUYWJsZU5hbWV9X2xvY2FsZV9wYXJlbnRgKS5vbihcbiAgICAgICAgICBjb2xzLmxvY2FsZSxcbiAgICAgICAgICBjb2xzLnBhcmVudCxcbiAgICAgICAgKVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gY29uZmlnXG4gICAgfSlcblxuICAgIGFkYXB0ZXIudGFibGVzW251bWJlcnNUYWJsZU5hbWVdID0gbnVtYmVyc1RhYmxlXG5cbiAgICBjb25zdCBudW1iZXJzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMobnVtYmVyc1RhYmxlLCAoeyBvbmUgfSkgP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yxcbiAgICAgICAgKGNvbHMpID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIEZvcmVpZ25LZXlCdWlsZGVyIHwgSW5kZXhCdWlsZGVyPiA9IE9iamVjdC5lbnRyaWVzKFxuICAgICAgICAgICAgcmVsYXRpb25FeHRyYUNvbmZpZyxcbiAgICAgICAgICApLnJlZHVjZShcbiAgICAgICAgICAgIChjb25maWcsIFtrZXksIGZ1bmNdKSA9PiB7XG4gICAgICAgICAgICAgIGNvbmZpZ1trZXldID0gZnVuYyhjb2xzKVxuICAgICAgICAgICAgICByZXR1cm4gY29uZmlnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBvcmRlcjogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fb3JkZXJfaWR4YCkub24oY29scy5vcmRlciksXG4gICAgICAgICAgICAgIHBhcmVudEZrOiBmb3JlaWduS2V5KHtcbiAgICAgICAgICAgICAgICBuYW1lOiBgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9wYXJlbnRfZmtgLFxuICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtjb2xzLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgZm9yZWlnbkNvbHVtbnM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICAgIH0pLm9uRGVsZXRlKCdjYXNjYWRlJyksXG4gICAgICAgICAgICAgIHBhcmVudElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGFyZW50X2lkeGApLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICAgICAgcGF0aElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGF0aF9pZHhgKS5vbihjb2xzLnBhdGgpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApXG5cbiAgICAgICAgICBpZiAoaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIHtcbiAgICAgICAgICAgIHJlc3VsdC5sb2NhbGVJZHggPSBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9sb2NhbGVfaWR4YCkub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9LFxuICAgICAgKVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gY3JlYXRlVGFibGVOYW1lKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjb25maWc6IGFkYXB0ZXIucGF5bG9hZC5jb2xsZWN0aW9uc1tyZWxhdGlvblRvXS5jb25maWcsXG4gICAgICAgICAgICB0aHJvd1ZhbGlkYXRpb25FcnJvcjogdHJ1ZSxcbiAgICAgICAgICB9KVxuICAgICAgICAgIGNvbnN0IGlkQ29sdW1uTmFtZSA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I7UUFDQSxJQUFJYSxvQkFBb0I7WUFDdEJ1QixPQUFPbUYsUUFBUSxHQUFHSixLQUFLbEg7UUFDekI7UUFFQSxJQUFJQyxjQUFjK0UsSUFBSSxJQUFJN0Usb0JBQW9CO1lBQzVDZ0MsT0FBT29GLEtBQUssR0FBR0wsS0FBSy9HLG9CQUFvQjtnQkFDdEMyRyxjQUFjO1lBQ2hCO1FBQ0Y7UUFFQSxPQUFPM0U7SUFDVDtJQUVBM0QsUUFBUWtGLFNBQVMsQ0FBQyxDQUFDLFVBQVUsRUFBRXBFLFVBQVUsQ0FBQyxDQUFDLEdBQUcySDtJQUU5QyxPQUFPO1FBQ0x4RztRQUNBQztRQUNBQztRQUNBQztRQUNBQztRQUNBVDtJQUNGO0FBQ0YifQ==
@@ -24,6 +24,11 @@ type Args = {
24
24
  rootTableIDColType: string;
25
25
  rootTableName: string;
26
26
  versions: boolean;
27
+ /**
28
+ * Tracks whether or not this table is built
29
+ * from the result of a localized array or block field at some point
30
+ */
31
+ withinLocalizedArrayOrBlock?: boolean;
27
32
  };
28
33
  type Result = {
29
34
  hasLocalizedField: boolean;
@@ -33,6 +38,6 @@ type Result = {
33
38
  hasManyNumberField: 'index' | boolean;
34
39
  hasManyTextField: 'index' | boolean;
35
40
  };
36
- export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, buildTexts, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, versions, }: Args) => Result;
41
+ export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, buildTexts, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, versions, withinLocalizedArrayOrBlock, }: Args) => Result;
37
42
  export {};
38
43
  //# sourceMappingURL=traverseFields.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