@payloadcms/db-postgres 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +5 -52
- package/dist/count.d.ts.map +1 -1
- package/dist/count.js +3 -3
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +10 -4
- package/dist/find/findMany.d.ts.map +1 -1
- package/dist/find/findMany.js +3 -3
- package/dist/init.js +3 -2
- package/dist/migrate.js +3 -3
- package/dist/migrateDown.js +2 -2
- package/dist/migrateRefresh.js +2 -2
- package/dist/migrateReset.js +3 -3
- package/dist/migrateStatus.js +2 -2
- package/dist/queries/parseParams.d.ts.map +1 -1
- package/dist/queries/parseParams.js +3 -1
- package/dist/queries/sanitizeQueryValue.d.ts +2 -1
- package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
- package/dist/queries/sanitizeQueryValue.js +11 -2
- package/dist/schema/build.d.ts +10 -2
- package/dist/schema/build.d.ts.map +1 -1
- package/dist/schema/build.js +23 -6
- package/dist/schema/traverseFields.d.ts +6 -1
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +46 -17
- package/dist/transform/read/hasManyNumber.d.ts +2 -1
- package/dist/transform/read/hasManyNumber.d.ts.map +1 -1
- package/dist/transform/read/hasManyNumber.js +14 -4
- package/dist/transform/read/hasManyText.d.ts +2 -1
- package/dist/transform/read/hasManyText.d.ts.map +1 -1
- package/dist/transform/read/hasManyText.js +14 -4
- package/dist/transform/read/relationship.d.ts +2 -1
- package/dist/transform/read/relationship.d.ts.map +1 -1
- package/dist/transform/read/relationship.js +16 -7
- package/dist/transform/read/traverseFields.d.ts +5 -1
- package/dist/transform/read/traverseFields.d.ts.map +1 -1
- package/dist/transform/read/traverseFields.js +118 -85
- package/dist/transform/write/array.d.ts +6 -1
- package/dist/transform/write/array.d.ts.map +1 -1
- package/dist/transform/write/array.js +7 -3
- package/dist/transform/write/blocks.d.ts +6 -1
- package/dist/transform/write/blocks.d.ts.map +1 -1
- package/dist/transform/write/blocks.js +5 -3
- package/dist/transform/write/traverseFields.d.ts +6 -1
- package/dist/transform/write/traverseFields.d.ts.map +1 -1
- package/dist/transform/write/traverseFields.js +40 -15
- package/dist/types.d.ts +9 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/migrationTableExists.d.ts +2 -2
- package/dist/utilities/migrationTableExists.d.ts.map +1 -1
- package/dist/utilities/migrationTableExists.js +10 -6
- package/dist/utilities/pushDevSchema.d.ts +9 -0
- package/dist/utilities/pushDevSchema.d.ts.map +1 -0
- package/dist/utilities/pushDevSchema.js +59 -0
- package/dist/utilities/requireDrizzleKit.d.ts +14 -0
- package/dist/utilities/requireDrizzleKit.d.ts.map +1 -0
- package/dist/utilities/requireDrizzleKit.js +13 -0
- package/package.json +5 -5
package/dist/migrateStatus.js
CHANGED
@@ -20,7 +20,7 @@ async function migrateStatus() {
|
|
20
20
|
msg: `Found ${migrationFiles.length} migration files.`
|
21
21
|
});
|
22
22
|
let existingMigrations = [];
|
23
|
-
const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this
|
23
|
+
const hasMigrationTable = await (0, _migrationTableExists.migrationTableExists)(this);
|
24
24
|
if (hasMigrationTable) {
|
25
25
|
({ existingMigrations } = await (0, _database.getMigrations)({
|
26
26
|
payload
|
@@ -51,4 +51,4 @@ async function migrateStatus() {
|
|
51
51
|
p.printTable();
|
52
52
|
}
|
53
53
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlU3RhdHVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRhYmxlIH0gZnJvbSAnY29uc29sZS10YWJsZS1wcmludGVyJ1xuaW1wb3J0IHsgZ2V0TWlncmF0aW9ucywgcmVhZE1pZ3JhdGlvbkZpbGVzIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBQ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QixFQUFDLElBQUk7SUFFekQsSUFBSUQsbUJBQW1CO1FBQ25CLENBQUEsRUFBRUQsa0JBQWtCLEVBQUUsR0FBRyxNQUFNRyxJQUFBQSx1QkFBYSxFQUFDO1lBQUVWO1FBQVEsRUFBQztJQUM1RDtJQUVBLElBQUksQ0FBQ0MsZUFBZUssTUFBTSxFQUFFO1FBQzFCTixRQUFRRyxNQUFNLENBQUNRLElBQUksQ0FBQztZQUFFTixLQUFLO1FBQXVCO1FBQ2xEO0lBQ0Y7SUFFQSxpREFBaUQ7SUFDakQsTUFBTU8sV0FBV1gsZUFBZVksR0FBRyxDQUFDLENBQUNDO1FBQ25DLE1BQU1DLG9CQUFvQlIsbUJBQW1CUyxJQUFJLENBQUMsQ0FBQ0MsSUFBTUEsRUFBRUMsSUFBSSxLQUFLSixVQUFVSSxJQUFJO1FBQ2xGLE9BQU87WUFDTEMsTUFBTUwsVUFBVUksSUFBSTtZQUNwQixzREFBc0Q7WUFDdERFLE9BQU9MLG1CQUFtQk07WUFDMUJDLEtBQUtQLG9CQUFvQixRQUFRO1FBQ25DO0lBQ0Y7SUFFQSxNQUFNUSxJQUFJLElBQUlDLDBCQUFLO0lBRW5CWixTQUFTYSxPQUFPLENBQUMsQ0FBQ0M7UUFDaEJILEVBQUVJLE1BQU0sQ0FBQ0QsR0FBRztZQUNWRSxPQUFPRixFQUFFSixHQUFHLEtBQUssUUFBUSxVQUFVO1FBQ3JDO0lBQ0Y7SUFDQUMsRUFBRU0sVUFBVTtBQUNkIn0=
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAO3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAgNrB"}
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "parseParams", {
|
|
9
9
|
}
|
10
10
|
});
|
11
11
|
const _drizzleorm = require("drizzle-orm");
|
12
|
+
const _pgcore = require("drizzle-orm/pg-core");
|
12
13
|
const _errors = require("payload/errors");
|
13
14
|
const _types = require("payload/types");
|
14
15
|
const _buildAndOrConditions = require("./buildAndOrConditions");
|
@@ -144,6 +145,7 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
|
|
144
145
|
const sanitizedQueryValue = (0, _sanitizeQueryValue.sanitizeQueryValue)({
|
145
146
|
adapter,
|
146
147
|
field,
|
148
|
+
isUUID: table?.[columnName] instanceof _pgcore.PgUUID,
|
147
149
|
operator,
|
148
150
|
relationOrPath,
|
149
151
|
val
|
@@ -192,4 +194,4 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
|
|
192
194
|
return result;
|
193
195
|
}
|
194
196
|
|
195
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3BhcnNlUGFyYW1zLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7IEZpZWxkLCBPcGVyYXRvciwgV2hlcmUgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBhbmQsIGlsaWtlLCBpc05vdE51bGwsIGlzTnVsbCwgbmUsIG5vdEluQXJyYXksIG9yLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IFF1ZXJ5RXJyb3IgfSBmcm9tICdwYXlsb2FkL2Vycm9ycydcbmltcG9ydCB7IHZhbGlkT3BlcmF0b3JzIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBHZW5lcmljQ29sdW1uLCBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQnVpbGRRdWVyeUpvaW5BbGlhc2VzLCBCdWlsZFF1ZXJ5Sm9pbnMgfSBmcm9tICcuL2J1aWxkUXVlcnknXG5cbmltcG9ydCB7IGJ1aWxkQW5kT3JDb25kaXRpb25zIH0gZnJvbSAnLi9idWlsZEFuZE9yQ29uZGl0aW9ucydcbmltcG9ydCB7IGNyZWF0ZUpTT05RdWVyeSB9IGZyb20gJy4vY3JlYXRlSlNPTlF1ZXJ5J1xuaW1wb3J0IHsgY29udmVydFBhdGhUb0pTT05UcmF2ZXJzYWwgfSBmcm9tICcuL2NyZWF0ZUpT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b3IgYSBzY2hlbWEgcGF0aFxuICAgIGZvciAoY29uc3QgcmVsYXRpb25PclBhdGggb2YgT2JqZWN0LmtleXMod2hlcmUpKSB7XG4gICAgICBpZiAocmVsYXRpb25PclBhdGgpIHtcbiAgICAgICAgY29uc3QgY29uZGl0aW9uID0gd2hlcmVbcmVsYXRpb25PclBhdGhdXG4gICAgICAgIGxldCBjb25kaXRpb25PcGVyYXRvcjogJ2FuZCcgfCAnb3InXG4gICAgICAgIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnYW5kJykge1xuICAgICAgICAgIGNvbmRpdGlvbk9wZXJhdG9yID0gJ2FuZCdcbiAgICAgICAgfSBlbHNlIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnb3InKSB7XG4gICAgICAgICAgY29uZGl0aW9uT3BlcmF0b3IgPSAnb3InXG4gICAgICAgIH1cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZGl0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IGJ1aWx0Q29uZGl0aW9ucyA9IGF3YWl0IGJ1aWxkQW5kT3JDb25kaXRpb25zKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgd2hlcmU6IGNvbmRpdGlvbixcbiAgICAgICAgICB9KVxuICAgICAgICAgIGlmIChidWlsdENvbmRpdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgcmVzdWx0ID0gb3BlcmF0b3JNYXBbY29uZGl0aW9uT3BlcmF0b3JdKC4uLmJ1aWx0Q29uZGl0aW9ucylcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gSXQncyBhIHBhdGggLSBhbmQgdGhlcmUgY2FuIGJlIG11bHRpcGxlIGNvbXBhcmlzb25zIG9uIGEgc2luZ2xlIHBhdGguXG4gICAgICAgICAgLy8gRm9yIGV4YW1wbGUgLSB0aXRsZSBsaWtlICd0ZXN0JyBhbmQgdGl0bGUgbm90IGVxdWFsIHRvICd0ZXN0ZXInXG4gICAgICAgICAgLy8gU28gd2UgbmVlZCB0byBsb29wIG9uIGtleXMgYWdhaW4gaGVyZSB0byBoYW5kbGUgZWFjaCBvcGVyYXRvciBpbmRlcGVuZGVudGx5XG4gICAgICAgICAgY29uc3QgcGF0aE9wZXJhdG9ycyA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVxuICAgICAgICAgIGlmICh0eXBlb2YgcGF0aE9wZXJhdG9ycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIGZvciAobGV0IG9wZXJhdG9yIG9mIE9iamVjdC5rZXlzKHBhdGhPcGVyYXRvcnMpKSB7XG4gICAgICAgICAgICAgIGlmICh2YWxpZE9wZXJhdG9ycy5pbmNsdWRlcyhvcGVyYXRvciBhcyBPcGVyYXRvcikpIHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB3aGVyZVtyZWxhdGlvbk9yUGF0aF1bb3BlcmF0b3JdXG4gICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLFxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBxdWVyeUNvbnN0cmFpbnRzLmZvckVhY2goKHsgY29sdW1uTmFtZTogY29sLCB0YWJsZTogY29uc3RyYWludFRhYmxlLCB2YWx1ZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyAmJiB2YWx1ZS5pbmRleE9mKCclJykgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKG9wZXJhdG9yTWFwLmxpa2UoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAuZXF1YWxzKGNvbnN0cmFpbnRUYWJsZVtjb2xdLCB2YWx1ZSkpXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIFsnanNvbicsICdyaWNoVGV4dCddLmluY2x1ZGVzKGZpZWxkLnR5cGUpICYmXG4gICAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KHBhdGhTZWdtZW50cykgJiZcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cy5sZW5ndGggPiAxXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBzZWdtZW50cyA9IHBhdGhTZWdtZW50cy5zbGljZSgxKVxuICAgICAgICAgICAgICAgICAgc2VnbWVudHMudW5zaGlmdCh0YWJsZVtjb2x1bW5OYW1lXS5uYW1lKVxuXG4gICAgICAgICAgICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JpY2hUZXh0Jykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjcmVhdGVKU09OUXVlcnkoe1xuICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50czogc2VnbWVudHMsXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRBc0FycmF5OiBbJ2NoaWxkcmVuJ10sXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRSb290QXNBcnJheTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLFxuICAgICAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goc3FsLnJhdyhqc29uUXVlcnkpKVxuICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjb252ZXJ0UGF0aFRvSlNPTlRyYXZlcnNhbChwYXRoU2VnbWVudHMpXG4gICAgICAgICAgICAgICAgICBjb25zdCBvcGVyYXRvcktleXMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zOiB7IG9wZXJhdG9yOiAnaWxpa2UnLCB3aWxkY2FyZDogJyUnIH0sXG4gICAgICAgICAgICAgICAgICAgIGVxdWFsczogeyBvcGVyYXRvcjogJz0nLCB3aWxkY2FyZDogJycgfSxcbiAgICAgICAgICAgICAgICAgICAgZXhpc3RzOiB7IG9wZXJhdG9yOiB2YWwgPT09IHRydWUgPyAnaXMgbm90IG51bGwnIDogJ2lzIG51bGwnIH0sXG4gICAgICAgICAgICAgICAgICAgIGxpa2U6IHsgb3BlcmF0b3I6ICdsaWtlJywgd2lsZGNhcmQ6ICclJyB9LFxuICAgICAgICAgICAgICAgICAgICBub3RfZXF1YWxzOiB7IG9wZXJhdG9yOiAnPD4nLCB3aWxkY2FyZDogJycgfSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGxldCBmb3JtYXR0ZWRWYWx1ZSA9IGAnJHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLndpbGRjYXJkfSR7dmFsfSR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS53aWxkY2FyZH0nYFxuXG4gICAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdleGlzdHMnKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZFZhbHVlID0gJydcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsLnJhdyhcbiAgICAgICAgICAgICAgICAgICAgICBgJHt0YWJsZVtjb2x1bW5OYW1lXS5uYW1lfSR7anNvblF1ZXJ5fSAke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ub3BlcmF0b3J9ICR7Zm9ybWF0dGVkVmFsdWV9YCxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbk5hbWUgPSBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSh2YWwpXG4gICAgICAgICAgICAgICAgICBpZiAoY29sdW1uTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbCh0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUXVlcnlFcnJvcihbeyBwYXRoOiByZWxhdGlvbk9yUGF0aCB9XSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdsaWtlJyAmJlxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInIHx8IHRhYmxlW2NvbHVtbk5hbWVdLmNvbHVtblR5cGUgPT09ICdQZ1VVSUQnKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPSAnZXF1YWxzJ1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2xpa2UnKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBhbmQoLi4udmFsLnNwbGl0KCcgJykubWFwKCh3b3JkKSA9PiBpbGlrZSh0YWJsZVtjb2x1bW5OYW1lXSwgYCUke3dvcmR9JWApKSksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHNhbml0aXplZFF1ZXJ5VmFsdWUgPSBzYW5pdGl6ZVF1ZXJ5VmFsdWUoe1xuICAgICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbk9yUGF0aCxcbiAgICAgICAgICAgICAgICAgIHZhbCxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKHNhbml0aXplZFF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgeyBvcGVyYXRvcjogcXVlcnlPcGVyYXRvciwgdmFsdWU6IHF1ZXJ5VmFsdWUgfSA9IHNhbml0aXplZFF1ZXJ5VmFsdWVcblxuICAgICAgICAgICAgICAgIGlmIChxdWVyeU9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgb3IoXG4gICAgICAgICAgICAgICAgICAgICAgaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSksXG4gICAgICAgICAgICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgICAgICAgICAgIG5lPGFueT4ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSAmJlxuICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShxdWVyeVZhbHVlKSAmJlxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdub3RfaW4nXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWxgKCR7bm90SW5BcnJheSh0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSl9IE9SXG4gICAgICAgICAgICAgICAgICAgICR7dGFibGVbY29sdW1uTmFtZV19XG4gICAgICAgICAgICAgICAgICAgIElTXG4gICAgICAgICAgICAgICAgICAgIE5VTEwpYCxcbiAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdlcXVhbHMnICYmIHF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG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vbnN0IGNvbmRpdGlvbiA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVxuICAgICAgICBsZXQgY29uZGl0aW9uT3BlcmF0b3I6ICdhbmQnIHwgJ29yJ1xuICAgICAgICBpZiAocmVsYXRpb25PclBhdGgudG9Mb3dlckNhc2UoKSA9PT0gJ2FuZCcpIHtcbiAgICAgICAgICBjb25kaXRpb25PcGVyYXRvciA9ICdhbmQnXG4gICAgICAgIH0gZWxzZSBpZiAocmVsYXRpb25PclBhdGgudG9Mb3dlckNhc2UoKSA9PT0gJ29yJykge1xuICAgICAgICAgIGNvbmRpdGlvbk9wZXJhdG9yID0gJ29yJ1xuICAgICAgICB9XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGNvbmRpdGlvbikpIHtcbiAgICAgICAgICBjb25zdCBidWlsdENvbmRpdGlvbnMgPSBhd2FpdCBidWlsZEFuZE9yQ29uZGl0aW9ucyh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZSxcbiAgICAgICAgICAgIHdoZXJlOiBjb25kaXRpb24sXG4gICAgICAgICAgfSlcbiAgICAgICAgICBpZiAoYnVpbHRDb25kaXRpb25zLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IG9wZXJhdG9yTWFwW2NvbmRpdGlvbk9wZXJhdG9yXSguLi5idWlsdENvbmRpdGlvbnMpXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIEl0J3MgYSBwYXRoIC0gYW5kIHRoZXJlIGNhbiBiZSBtdWx0aXBsZSBjb21wYXJpc29ucyBvbiBhIHNpbmdsZSBwYXRoLlxuICAgICAgICAgIC8vIEZvciBleGFtcGxlIC0gdGl0bGUgbGlrZSAndGVzdCcgYW5kIHRpdGxlIG5vdCBlcXVhbCB0byAndGVzdGVyJ1xuICAgICAgICAgIC8vIFNvIHdlIG5lZWQgdG8gbG9vcCBvbiBrZXlzIGFnYWluIGhlcmUgdG8gaGFuZGxlIGVhY2ggb3BlcmF0b3IgaW5kZXBlbmRlbnRseVxuICAgICAgICAgIGNvbnN0IHBhdGhPcGVyYXRvcnMgPSB3aGVyZVtyZWxhdGlvbk9yUGF0aF1cbiAgICAgICAgICBpZiAodHlwZW9mIHBhdGhPcGVyYXRvcnMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBvcGVyYXRvciBvZiBPYmplY3Qua2V5cyhwYXRoT3BlcmF0b3JzKSkge1xuICAgICAgICAgICAgICBpZiAodmFsaWRPcGVyYXRvcnMuaW5jbHVkZXMob3BlcmF0b3IgYXMgT3BlcmF0b3IpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsID0gd2hlcmVbcmVsYXRpb25PclBhdGhdW29wZXJhdG9yXVxuICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgIGNvbHVtbk5hbWUsXG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50czogcXVlcnlDb25zdHJhaW50cyxcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUsXG4gICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHMsXG4gICAgICAgICAgICAgICAgICByYXdDb2x1bW4sXG4gICAgICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgICB9ID0gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgY29sbGVjdGlvblBhdGg6IHJlbGF0aW9uT3JQYXRoLFxuICAgICAgICAgICAgICAgICAgZmllbGRzLFxuICAgICAgICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50czogcmVsYXRpb25PclBhdGgucmVwbGFjZSgvX18vZywgJy4nKS5zcGxpdCgnLicpLFxuICAgICAgICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbCxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgcXVlcnlDb25zdHJhaW50cy5mb3JFYWNoKCh7IGNvbHVtbk5hbWU6IGNvbCwgdGFibGU6IGNvbnN0cmFpbnRUYWJsZSwgdmFsdWUgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgJiYgdmFsdWUuaW5kZXhPZignJScpID4gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5saWtlKGNvbnN0cmFpbnRUYWJsZVtjb2xdLCB2YWx1ZSkpXG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKG9wZXJhdG9yTWFwLmVxdWFscyhjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBbJ2pzb24nLCAncmljaFRleHQnXS5pbmNsdWRlcyhmaWVsZC50eXBlKSAmJlxuICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShwYXRoU2VnbWVudHMpICYmXG4gICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHMubGVuZ3RoID4gMVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3Qgc2VnbWVudHMgPSBwYXRoU2VnbWVudHMuc2xpY2UoMSlcbiAgICAgICAgICAgICAgICAgIHNlZ21lbnRzLnVuc2hpZnQodGFibGVbY29sdW1uTmFtZV0ubmFtZSlcblxuICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyaWNoVGV4dCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QganNvblF1ZXJ5ID0gY3JlYXRlSlNPTlF1ZXJ5KHtcbiAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcixcbiAgICAgICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHM6IHNlZ21lbnRzLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0QXNBcnJheTogWydjaGlsZHJlbiddLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0Um9vdEFzQXJyYXk6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbCxcbiAgICAgICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHNxbC5yYXcoanNvblF1ZXJ5KSlcbiAgICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgY29uc3QganNvblF1ZXJ5ID0gY29udmVydFBhdGhUb0pTT05UcmF2ZXJzYWwocGF0aFNlZ21lbnRzKVxuICAgICAgICAgICAgICAgICAgY29uc3Qgb3BlcmF0b3JLZXlzID0ge1xuICAgICAgICAgICAgICAgICAgICBjb250YWluczogeyBvcGVyYXRvcjogJ2lsaWtlJywgd2lsZGNhcmQ6ICclJyB9LFxuICAgICAgICAgICAgICAgICAgICBlcXVhbHM6IHsgb3BlcmF0b3I6ICc9Jywgd2lsZGNhcmQ6ICcnIH0sXG4gICAgICAgICAgICAgICAgICAgIGV4aXN0czogeyBvcGVyYXRvcjogdmFsID09PSB0cnVlID8gJ2lzIG5vdCBudWxsJyA6ICdpcyBudWxsJyB9LFxuICAgICAgICAgICAgICAgICAgICBsaWtlOiB7IG9wZXJhdG9yOiAnbGlrZScsIHdpbGRjYXJkOiAnJScgfSxcbiAgICAgICAgICAgICAgICAgICAgbm90X2VxdWFsczogeyBvcGVyYXRvcjogJzw+Jywgd2lsZGNhcmQ6ICcnIH0sXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBsZXQgZm9ybWF0dGVkVmFsdWUgPSBgJyR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS53aWxkY2FyZH0ke3ZhbH0ke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ud2lsZGNhcmR9J2BcblxuICAgICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnZXhpc3RzJykge1xuICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWRWYWx1ZSA9ICcnXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIHNxbC5yYXcoXG4gICAgICAgICAgICAgICAgICAgICAgYCR7dGFibGVbY29sdW1uTmFtZV0ubmFtZX0ke2pzb25RdWVyeX0gJHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLm9wZXJhdG9yfSAke2Zvcm1hdHRlZFZhbHVlfWAsXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBjb2x1bW5OYW1lID0gZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUodmFsKVxuICAgICAgICAgICAgICAgICAgaWYgKGNvbHVtbk5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc05vdE51bGwodGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFF1ZXJ5RXJyb3IoW3sgcGF0aDogcmVsYXRpb25PclBhdGggfV0pXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID09PSAnbGlrZScgJiZcbiAgICAgICAgICAgICAgICAgIChmaWVsZC50eXBlID09PSAnbnVtYmVyJyB8fCB0YWJsZVtjb2x1bW5OYW1lXS5jb2x1bW5UeXBlID09PSAnUGdVVUlEJylcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID0gJ2VxdWFscydcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdsaWtlJykge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgYW5kKC4uLnZhbC5zcGxpdCgnICcpLm1hcCgod29yZCkgPT4gaWxpa2UodGFibGVbY29sdW1uTmFtZV0sIGAlJHt3b3JkfSVgKSkpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzYW5pdGl6ZWRRdWVyeVZhbHVlID0gc2FuaXRpemVRdWVyeVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIGlzVVVJRDogdGFibGU/Lltjb2x1bW5OYW1lXSBpbnN0YW5jZW9mIFBnVVVJRCxcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChzYW5pdGl6ZWRRdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHsgb3BlcmF0b3I6IHF1ZXJ5T3BlcmF0b3IsIHZhbHVlOiBxdWVyeVZhbHVlIH0gPSBzYW5pdGl6ZWRRdWVyeVZhbHVlXG5cbiAgICAgICAgICAgICAgICBpZiAocXVlcnlPcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIG9yKFxuICAgICAgICAgICAgICAgICAgICAgIGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pLFxuICAgICAgICAgICAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgICAgICAgICAgICBuZTxhbnk+KHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIChmaWVsZC50eXBlID09PSAncmVsYXRpb25zaGlwJyB8fCBmaWVsZC50eXBlID09PSAndXBsb2FkJykgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocXVlcnlWYWx1ZSkgJiZcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID09PSAnbm90X2luJ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsYCgke25vdEluQXJyYXkodGFibGVbY29sdW1uTmFtZV0sIHF1ZXJ5VmFsdWUpfSBPUlxuICAgICAgICAgICAgICAgICAgICAke3RhYmxlW2NvbHVtbk5hbWVdfVxuICAgICAgICAgICAgICAgICAgICBJU1xuICAgICAgICAgICAgICAgICAgICBOVUxMKWAsXG4gICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnZXF1YWxzJyAmJiBxdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdub3RfZXF1YWxzJyAmJiBxdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3JNYXBbcXVlcnlPcGVyYXRvcl0ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKS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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;
|
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
|
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,
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3Nhbml0aXplUXVlcnlWYWx1ZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBUElFcnJvciB9IGZyb20gJ3BheWxvYWQvZXJyb3JzJ1xuaW1wb3J0IHsgdHlwZSBGaWVsZCwgdHlwZSBUYWJBc0ZpZWxkLCBmaWVsZEFmZmVjdHNEYXRhIH0gZnJvbSAncGF5bG9hZC90eXBlcydcbmltcG9ydCB7IGNyZWF0ZUFycmF5RnJvbUNvbW1hRGVsaW5lYXRlZCB9IGZyb20gJ3BheWxvYWQvdXRpbGl0aWVzJ1xuaW1wb3J0IHsgdmFsaWRhdGUgYXMgdXVpZFZhbGlkYXRlIH0gZnJvbSAndXVpZCdcblxuaW1wb3J0IHR5cGUgeyBQb3N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NQUFNZ0MsT0FBTyxJQUFJOUIsYUFBYSxZQUFZO1FBQ2xFQSxXQUFXO0lBQ2I7SUFFQSxJQUFJQSxhQUFhLFVBQVVBLGFBQWEsWUFBWUEsYUFBYSxjQUFjO1FBQzdFLE1BQU0sSUFBSStCLGdCQUFRLENBQ2hCLENBQUMsZUFBZSxFQUFFL0IsU0FBUyxzREFBc0QsQ0FBQztJQUV0RjtJQUVBLElBQUlBLGFBQWEsWUFBWTtRQUMzQkksaUJBQWlCLENBQUMsQ0FBQyxFQUFFQSxlQUFlLENBQUMsQ0FBQztJQUN4QztJQUVBLElBQUlKLGFBQWEsVUFBVTtRQUN6QkksaUJBQWlCQSxtQkFBbUIsVUFBVUEsbUJBQW1CO1FBQ2pFLElBQUlBLG1CQUFtQixPQUFPO1lBQzVCSixXQUFXO1FBQ2I7SUFDRjtJQUVBLE9BQU87UUFBRUE7UUFBVU0sT0FBT0Y7SUFBZTtBQUMzQyJ9
|
package/dist/schema/build.d.ts
CHANGED
@@ -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,
|
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,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAgB1C,OAAO,KAAK,EAAE,cAAc,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAA;AAQrF,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,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"}
|
package/dist/schema/build.js
CHANGED
@@ -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
|
-
|
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[
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW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uICAgICAgcmVsYXRpb25zaGlwc1RhYmxlID0gYWRhcHRlci5wZ1NjaGVtYS50YWJsZShcbiAgICAgICAgcmVsYXRpb25zaGlwc1RhYmxlTmFtZSxcbiAgICAgICAgcmVsYXRpb25zaGlwQ29sdW1ucyxcbiAgICAgICAgKGNvbHMpID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIEZvcmVpZ25LZXlCdWlsZGVyIHwgSW5kZXhCdWlsZGVyPiA9IE9iamVjdC5lbnRyaWVzKFxuICAgICAgICAgICAgcmVsYXRpb25FeHRyYUNvbmZpZyxcbiAgICAgICAgICApLnJlZHVjZShcbiAgICAgICAgICAgIChjb25maWcsIFtrZXksIGZ1bmNdKSA9PiB7XG4gICAgICAgICAgICAgIGNvbmZpZ1trZXldID0gZnVuYyhjb2xzKVxuICAgICAgICAgICAgICByZXR1cm4gY29uZmlnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBvcmRlcjogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fb3JkZXJfaWR4YCkub24oY29scy5vcmRlciksXG4gICAgICAgICAgICAgIHBhcmVudEZrOiBmb3JlaWduS2V5KHtcbiAgICAgICAgICAgICAgICBuYW1lOiBgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9wYXJlbnRfZmtgLFxuICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtjb2xzLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgZm9yZWlnbkNvbHVtbnM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICAgIH0pLm9uRGVsZXRlKCdjYXNjYWRlJyksXG4gICAgICAgICAgICAgIHBhcmVudElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGFyZW50X2lkeGApLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICAgICAgcGF0aElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGF0aF9pZHhgKS5vbihjb2xzLnBhdGgpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApXG5cbiAgICAgICAgICBpZiAoaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIHtcbiAgICAgICAgICAgIHJlc3VsdC5sb2NhbGVJZHggPSBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9sb2NhbGVfaWR4YCkub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9LFxuICAgICAgKVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gY3JlYXRlVGFibGVOYW1lKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjb25maWc6IGFkYXB0ZXIucGF5bG9hZC5jb2xsZ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vY2FsZScpXG4gICAgfVxuXG4gICAgbnVtYmVyc1RhYmxlID0gYWRhcHRlci5wZ1NjaGVtYS50YWJsZShudW1iZXJzVGFibGVOYW1lLCBjb2x1bW5zLCAoY29scykgPT4ge1xuICAgICAgY29uc3QgY29uZmlnOiBSZWNvcmQ8c3RyaW5nLCBGb3JlaWduS2V5QnVpbGRlciB8IEluZGV4QnVpbGRlcj4gPSB7XG4gICAgICAgIG9yZGVyUGFyZW50SWR4OiBpbmRleChgJHtudW1iZXJzVGFibGVOYW1lfV9vcmRlcl9wYXJlbnRfaWR4YCkub24oY29scy5vcmRlciwgY29scy5wYXJlbnQpLFxuICAgICAgICBwYXJlbnRGazogZm9yZWlnbktleSh7XG4gICAgICAgICAgbmFtZTogYCR7bnVtYmVyc1RhYmxlTmFtZX1fcGFyZW50X2ZrYCxcbiAgICAgICAgICBjb2x1bW5zOiBbY29scy5wYXJlbnRdLFxuICAgICAgICAgIGZvcmVpZ25Db2x1bW5zOiBbdGFibGUuaWRdLFxuICAgICAgICB9KS5vbkRlbGV0ZSgnY2FzY2FkZScpLFxuICAgICAgfVxuXG4gICAgICBpZiAoaGFzTWFueU51bWJlckZpZWxkID09PSAnaW5kZXgnKSB7XG4gICAgICAgIGNvbmZpZy5udW1iZXJJZHggPSBpbmRleChgJHtudW1iZXJzVGFibGVOYW1lfV9udW1iZXJfaWR4YCkub24oY29scy5udW1iZXIpXG4gICAgICB9XG5cbiAgICAgIGlmIChoYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQpIHtcbiAgICAgICAgY29uZmlnLmxvY2FsZVBhcmVudCA9IGluZGV4KGAke251bWJlcnNUYWJsZU5hbWV9X2xvY2FsZV9wYXJlbnRgKS5vbihcbiAgICAgICAgICBjb2xzLmxvY2FsZSxcbiAgICAgICAgICBjb2xzLnBhcmVudCxcbiAgICAgICAgKVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gY29uZmlnXG4gICAgfSlcblxuICAgIGFkYXB0ZXIudGFib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gICAgcmVsYXRpb25zaGlwc1RhYmxlID0gYWRhcHRlci5wZ1NjaGVtYS50YWJsZShcbiAgICAgICAgcmVsYXRpb25zaGlwc1RhYmxlTmFtZSxcbiAgICAgICAgcmVsYXRpb25zaGlwQ29sdW1ucyxcbiAgICAgICAgKGNvbHMpID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIEZvcmVpZ25LZXlCdWlsZGVyIHwgSW5kZXhCdWlsZGVyPiA9IE9iamVjdC5lbnRyaWVzKFxuICAgICAgICAgICAgcmVsYXRpb25FeHRyYUNvbmZpZyxcbiAgICAgICAgICApLnJlZHVjZShcbiAgICAgICAgICAgIChjb25maWcsIFtrZXksIGZ1bmNdKSA9PiB7XG4gICAgICAgICAgICAgIGNvbmZpZ1trZXldID0gZnVuYyhjb2xzKVxuICAgICAgICAgICAgICByZXR1cm4gY29uZmlnXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBvcmRlcjogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fb3JkZXJfaWR4YCkub24oY29scy5vcmRlciksXG4gICAgICAgICAgICAgIHBhcmVudEZrOiBmb3JlaWduS2V5KHtcbiAgICAgICAgICAgICAgICBuYW1lOiBgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9wYXJlbnRfZmtgLFxuICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtjb2xzLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgZm9yZWlnbkNvbHVtbnM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICAgIH0pLm9uRGVsZXRlKCdjYXNjYWRlJyksXG4gICAgICAgICAgICAgIHBhcmVudElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGFyZW50X2lkeGApLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICAgICAgcGF0aElkeDogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fcGF0aF9pZHhgKS5vbihjb2xzLnBhdGgpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApXG5cbiAgICAgICAgICBpZiAoaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIHtcbiAgICAgICAgICAgIHJlc3VsdC5sb2NhbGVJZHggPSBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9sb2NhbGVfaWR4YCkub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9LFxuICAgICAgKVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gY3JlYXRlVGFibGVOYW1lKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjb25maWc6IGFkYXB0ZXIucGF5bG9hZC5jb2xsZWN0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kzRyxtQkFBbUI7WUFDckIyQixPQUFPaUYsUUFBUSxHQUFHRixLQUFLcEg7UUFDekI7UUFFQSxJQUFJZSxrQkFBa0I7WUFDcEJzQixPQUFPa0YsTUFBTSxHQUFHSCxLQUFLbkg7UUFDdkI7UUFDQSxJQUFJYSxvQkFBb0I7WUFDdEJ1QixPQUFPbUYsUUFBUSxHQUFHSixLQUFLbEg7UUFDekI7UUFFQSxJQUFJQyxjQUFjK0UsSUFBSSxJQUFJN0Usb0JBQW9CO1lBQzVDZ0MsT0FBT29GLEtBQUssR0FBR0wsS0FBSy9HLG9CQUFvQjtnQkFDdEMyRyxjQUFjO1lBQ2hCO1FBQ0Y7UUFFQSxPQUFPM0U7SUFDVDtJQUVBM0QsUUFBUWtGLFNBQVMsQ0FBQyxDQUFDLFVBQVUsRUFBRXBFLFVBQVUsQ0FBQyxDQUFDLEdBQUcySDtJQUU5QyxPQUFPO1FBQ0x4RztRQUNBQztRQUNBQztRQUNBQztRQUNBQztRQUNBVDtJQUNGO0FBQ0YifQ==
|
@@ -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.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAqBtD,OAAO,KAAK,EAAE,cAAc,EAAU,eAAe,EAAE,MAAM,UAAU,CAAA;AAWvE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;IACrB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACxC,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB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