@payloadcms/drizzle 4.0.0-internal.697830c → 4.0.0-internal.77191e5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/createTableName.d.ts.map +1 -1
  2. package/dist/createTableName.js +2 -7
  3. package/dist/createTableName.js.map +1 -1
  4. package/dist/exports/postgres.d.ts +2 -0
  5. package/dist/exports/postgres.d.ts.map +1 -1
  6. package/dist/exports/postgres.js +2 -0
  7. package/dist/exports/postgres.js.map +1 -1
  8. package/dist/find/buildFindManyArgs.d.ts.map +1 -1
  9. package/dist/find/buildPolymorphicJoinQuery.d.ts +38 -0
  10. package/dist/find/buildPolymorphicJoinQuery.d.ts.map +1 -0
  11. package/dist/find/buildPolymorphicJoinQuery.js +135 -0
  12. package/dist/find/buildPolymorphicJoinQuery.js.map +1 -0
  13. package/dist/find/buildPolymorphicJoinWhere.d.ts +20 -0
  14. package/dist/find/buildPolymorphicJoinWhere.d.ts.map +1 -0
  15. package/dist/find/buildPolymorphicJoinWhere.js +301 -0
  16. package/dist/find/buildPolymorphicJoinWhere.js.map +1 -0
  17. package/dist/find/createPolymorphicJoinWherePlan.d.ts +37 -0
  18. package/dist/find/createPolymorphicJoinWherePlan.d.ts.map +1 -0
  19. package/dist/find/createPolymorphicJoinWherePlan.js +191 -0
  20. package/dist/find/createPolymorphicJoinWherePlan.js.map +1 -0
  21. package/dist/find/findMany.d.ts.map +1 -1
  22. package/dist/find/traverseFields.d.ts.map +1 -1
  23. package/dist/find/traverseFields.js +19 -191
  24. package/dist/find/traverseFields.js.map +1 -1
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/migrate.d.ts.map +1 -1
  30. package/dist/migrate.js +35 -13
  31. package/dist/migrate.js.map +1 -1
  32. package/dist/migrateDown.d.ts +2 -1
  33. package/dist/migrateDown.d.ts.map +1 -1
  34. package/dist/migrateDown.js +12 -2
  35. package/dist/migrateDown.js.map +1 -1
  36. package/dist/migrateFresh.d.ts +4 -2
  37. package/dist/migrateFresh.d.ts.map +1 -1
  38. package/dist/migrateFresh.js +21 -7
  39. package/dist/migrateFresh.js.map +1 -1
  40. package/dist/migrateRefresh.d.ts +2 -1
  41. package/dist/migrateRefresh.d.ts.map +1 -1
  42. package/dist/migrateRefresh.js +14 -3
  43. package/dist/migrateRefresh.js.map +1 -1
  44. package/dist/migrateReset.d.ts +2 -1
  45. package/dist/migrateReset.d.ts.map +1 -1
  46. package/dist/migrateReset.js +12 -2
  47. package/dist/migrateReset.js.map +1 -1
  48. package/dist/migrateStatus.d.ts +2 -1
  49. package/dist/migrateStatus.d.ts.map +1 -1
  50. package/dist/migrateStatus.js +11 -6
  51. package/dist/migrateStatus.js.map +1 -1
  52. package/dist/postgres/createDatabase.d.ts.map +1 -1
  53. package/dist/postgres/createExtensions.d.ts.map +1 -1
  54. package/dist/postgres/createJSONQuery/index.d.ts.map +1 -1
  55. package/dist/postgres/createJSONQuery/index.js +3 -3
  56. package/dist/postgres/createJSONQuery/index.js.map +1 -1
  57. package/dist/postgres/init.d.ts.map +1 -1
  58. package/dist/postgres/init.js +6 -0
  59. package/dist/postgres/init.js.map +1 -1
  60. package/dist/postgres/predefinedMigrations/v2-v3/fetchAndResave/index.d.ts.map +1 -1
  61. package/dist/postgres/predefinedMigrations/v2-v3/fetchAndResave/traverseFields.d.ts.map +1 -1
  62. package/dist/postgres/predefinedMigrations/v2-v3/groupUpSQLStatements.d.ts.map +1 -1
  63. package/dist/postgres/predefinedMigrations/v2-v3/index.d.ts.map +1 -1
  64. package/dist/postgres/predefinedMigrations/v2-v3/index.js +1 -1
  65. package/dist/postgres/predefinedMigrations/v2-v3/index.js.map +1 -1
  66. package/dist/postgres/predefinedMigrations/v2-v3/migrateRelationships.d.ts.map +1 -1
  67. package/dist/postgres/predefinedMigrations/v2-v3/traverseFields.d.ts.map +1 -1
  68. package/dist/postgres/query/assertOperatorHandlerExtensionsInstalled.d.ts +15 -0
  69. package/dist/postgres/query/assertOperatorHandlerExtensionsInstalled.d.ts.map +1 -0
  70. package/dist/postgres/query/assertOperatorHandlerExtensionsInstalled.js +25 -0
  71. package/dist/postgres/query/assertOperatorHandlerExtensionsInstalled.js.map +1 -0
  72. package/dist/postgres/query/postgresUnaccent.d.ts +13 -0
  73. package/dist/postgres/query/postgresUnaccent.d.ts.map +1 -0
  74. package/dist/postgres/query/postgresUnaccent.js +40 -0
  75. package/dist/postgres/query/postgresUnaccent.js.map +1 -0
  76. package/dist/postgres/schema/buildDrizzleTable.d.ts.map +1 -1
  77. package/dist/postgres/schema/geometryColumn.d.ts +2 -2
  78. package/dist/postgres/schema/geometryColumn.d.ts.map +1 -1
  79. package/dist/postgres/types.d.ts +13 -2
  80. package/dist/postgres/types.d.ts.map +1 -1
  81. package/dist/postgres/types.js.map +1 -1
  82. package/dist/queries/addJoinTable.d.ts +1 -1
  83. package/dist/queries/addJoinTable.d.ts.map +1 -1
  84. package/dist/queries/buildOperatorConstraint.d.ts +22 -0
  85. package/dist/queries/buildOperatorConstraint.d.ts.map +1 -0
  86. package/dist/queries/buildOperatorConstraint.js +63 -0
  87. package/dist/queries/buildOperatorConstraint.js.map +1 -0
  88. package/dist/queries/buildOrderBy.d.ts +1 -1
  89. package/dist/queries/buildOrderBy.d.ts.map +1 -1
  90. package/dist/queries/buildQuery.d.ts.map +1 -1
  91. package/dist/queries/getTableAlias.d.ts.map +1 -1
  92. package/dist/queries/getTableColumnFromPath.d.ts +12 -3
  93. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  94. package/dist/queries/getTableColumnFromPath.js +59 -27
  95. package/dist/queries/getTableColumnFromPath.js.map +1 -1
  96. package/dist/queries/operatorMap.d.ts +7 -3
  97. package/dist/queries/operatorMap.d.ts.map +1 -1
  98. package/dist/queries/operatorMap.js.map +1 -1
  99. package/dist/queries/parseParams.d.ts.map +1 -1
  100. package/dist/queries/parseParams.js +262 -10
  101. package/dist/queries/parseParams.js.map +1 -1
  102. package/dist/queries/resolveRelationshipPath.d.ts +36 -0
  103. package/dist/queries/resolveRelationshipPath.d.ts.map +1 -0
  104. package/dist/queries/resolveRelationshipPath.js +66 -0
  105. package/dist/queries/resolveRelationshipPath.js.map +1 -0
  106. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  107. package/dist/queries/selectDistinct.d.ts.map +1 -1
  108. package/dist/queries/validateOperatorHandlers.d.ts +8 -0
  109. package/dist/queries/validateOperatorHandlers.d.ts.map +1 -0
  110. package/dist/queries/validateOperatorHandlers.js +30 -0
  111. package/dist/queries/validateOperatorHandlers.js.map +1 -0
  112. package/dist/schema/build.d.ts.map +1 -1
  113. package/dist/schema/buildDrizzleRelations.d.ts.map +1 -1
  114. package/dist/schema/buildRawSchema.d.ts.map +1 -1
  115. package/dist/schema/idToUUID.d.ts.map +1 -1
  116. package/dist/schema/traverseFields.d.ts.map +1 -1
  117. package/dist/schema/traverseFields.js +5 -5
  118. package/dist/schema/traverseFields.js.map +1 -1
  119. package/dist/schema/withDefault.d.ts.map +1 -1
  120. package/dist/sqlite/createJSONQuery/convertPathToJSONTraversal.d.ts.map +1 -1
  121. package/dist/sqlite/createJSONQuery/convertPathToJSONTraversal.js +3 -2
  122. package/dist/sqlite/createJSONQuery/convertPathToJSONTraversal.js.map +1 -1
  123. package/dist/sqlite/createJSONQuery/index.d.ts.map +1 -1
  124. package/dist/sqlite/createJSONQuery/index.js +6 -5
  125. package/dist/sqlite/createJSONQuery/index.js.map +1 -1
  126. package/dist/transform/read/hasManyNumber.d.ts.map +1 -1
  127. package/dist/transform/read/hasManyText.d.ts.map +1 -1
  128. package/dist/transform/read/index.d.ts.map +1 -1
  129. package/dist/transform/read/relationship.d.ts.map +1 -1
  130. package/dist/transform/read/traverseFields.d.ts.map +1 -1
  131. package/dist/transform/write/array.d.ts.map +1 -1
  132. package/dist/transform/write/blocks.d.ts.map +1 -1
  133. package/dist/transform/write/index.d.ts.map +1 -1
  134. package/dist/transform/write/numbers.d.ts.map +1 -1
  135. package/dist/transform/write/relationships.d.ts.map +1 -1
  136. package/dist/transform/write/selects.d.ts.map +1 -1
  137. package/dist/transform/write/texts.d.ts.map +1 -1
  138. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  139. package/dist/transform/write/traverseFields.js +8 -14
  140. package/dist/transform/write/traverseFields.js.map +1 -1
  141. package/dist/types.d.ts +50 -2
  142. package/dist/types.d.ts.map +1 -1
  143. package/dist/types.js.map +1 -1
  144. package/dist/updateJobs.d.ts.map +1 -1
  145. package/dist/updateJobs.js +37 -0
  146. package/dist/updateJobs.js.map +1 -1
  147. package/dist/updateOne.d.ts.map +1 -1
  148. package/dist/updateOne.js +41 -1
  149. package/dist/updateOne.js.map +1 -1
  150. package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +1 -1
  151. package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +1 -1
  152. package/dist/upsertRow/handleUpsertError.d.ts.map +1 -1
  153. package/dist/upsertRow/index.d.ts +1 -1
  154. package/dist/upsertRow/index.d.ts.map +1 -1
  155. package/dist/upsertRow/index.js +25 -5
  156. package/dist/upsertRow/index.js.map +1 -1
  157. package/dist/upsertRow/insertArrays.d.ts.map +1 -1
  158. package/dist/upsertRow/shouldUseOptimizedUpsertRow.d.ts.map +1 -1
  159. package/dist/utilities/appendPrefixToKeys.d.ts.map +1 -1
  160. package/dist/utilities/blocksToJsonMigrator.d.ts.map +1 -1
  161. package/dist/utilities/buildCreateMigration.d.ts.map +1 -1
  162. package/dist/utilities/buildCreateMigration.js +12 -8
  163. package/dist/utilities/buildCreateMigration.js.map +1 -1
  164. package/dist/utilities/buildForeignKeyName.d.ts.map +1 -1
  165. package/dist/utilities/buildForeignKeyName.js +3 -2
  166. package/dist/utilities/buildForeignKeyName.js.map +1 -1
  167. package/dist/utilities/buildIndexName.d.ts.map +1 -1
  168. package/dist/utilities/buildIndexName.js +3 -2
  169. package/dist/utilities/buildIndexName.js.map +1 -1
  170. package/dist/utilities/checkTruncatedIdentifiers.d.ts +13 -0
  171. package/dist/utilities/checkTruncatedIdentifiers.d.ts.map +1 -0
  172. package/dist/utilities/checkTruncatedIdentifiers.js +56 -0
  173. package/dist/utilities/checkTruncatedIdentifiers.js.map +1 -0
  174. package/dist/utilities/createBlocksMap.d.ts.map +1 -1
  175. package/dist/utilities/createRelationshipMap.d.ts.map +1 -1
  176. package/dist/utilities/createSchemaGenerator.d.ts.map +1 -1
  177. package/dist/utilities/createSchemaGenerator.js +3 -0
  178. package/dist/utilities/createSchemaGenerator.js.map +1 -1
  179. package/dist/utilities/escapeSQLValue.d.ts.map +1 -1
  180. package/dist/utilities/executeSchemaHooks.d.ts.map +1 -1
  181. package/dist/utilities/extendDrizzleTable.d.ts.map +1 -1
  182. package/dist/utilities/getArrayRelationName.d.ts.map +1 -1
  183. package/dist/utilities/getCollectionIdType.d.ts.map +1 -1
  184. package/dist/utilities/getMigrationTemplate.d.ts.map +1 -1
  185. package/dist/utilities/getNameFromDrizzleTable.d.ts.map +1 -1
  186. package/dist/utilities/getPrimaryDb.d.ts +1 -1
  187. package/dist/utilities/getPrimaryDb.d.ts.map +1 -1
  188. package/dist/utilities/getTransaction.d.ts +1 -1
  189. package/dist/utilities/getTransaction.d.ts.map +1 -1
  190. package/dist/utilities/hasLocalesTable.d.ts.map +1 -1
  191. package/dist/utilities/isPolymorphicRelationship.d.ts.map +1 -1
  192. package/dist/utilities/isUUIDType.d.ts.map +1 -1
  193. package/dist/utilities/json.d.ts.map +1 -1
  194. package/dist/utilities/migrationTableExists.d.ts.map +1 -1
  195. package/dist/utilities/parseError.d.ts.map +1 -1
  196. package/dist/utilities/parseJSONPathSegment.d.ts +9 -0
  197. package/dist/utilities/parseJSONPathSegment.d.ts.map +1 -0
  198. package/dist/utilities/parseJSONPathSegment.js +17 -0
  199. package/dist/utilities/parseJSONPathSegment.js.map +1 -0
  200. package/dist/utilities/pushDevSchema.d.ts.map +1 -1
  201. package/dist/utilities/rawConstraint.d.ts.map +1 -1
  202. package/dist/utilities/sanitizePathSegment.d.ts.map +1 -1
  203. package/dist/utilities/validateExistingBlockIsIdentical.d.ts +1 -5
  204. package/dist/utilities/validateExistingBlockIsIdentical.d.ts.map +1 -1
  205. package/dist/utilities/validateExistingBlockIsIdentical.js.map +1 -1
  206. package/dist/utilities/validateIdentifierLength.d.ts +12 -0
  207. package/dist/utilities/validateIdentifierLength.d.ts.map +1 -0
  208. package/dist/utilities/validateIdentifierLength.js +18 -0
  209. package/dist/utilities/validateIdentifierLength.js.map +1 -0
  210. package/package.json +3 -3
  211. package/dist/upsertRow/handleUpsertError.spec.js +0 -42
  212. package/dist/upsertRow/handleUpsertError.spec.js.map +0 -1
  213. package/dist/utilities/isValidStringID.spec.js +0 -15
  214. package/dist/utilities/isValidStringID.spec.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ import { APIError } from 'payload';
2
+ /** Postgres max identifier length (NAMEDATALEN - 1). */ export const maxIdentifierLength = 63;
3
+ /**
4
+ * Cap for builder-generated identifiers (`buildIndexName`/`buildForeignKeyName`). Sits
5
+ * below `maxIdentifierLength` to leave headroom for the appended `_idx`/`_fk`/`_N` suffixes.
6
+ */ export const maxGeneratedIdentifierLength = maxIdentifierLength - 3;
7
+ /**
8
+ * Throws if a table or enum identifier exceeds the Postgres 63-char limit.
9
+ */ export const validateIdentifierLength = (name)=>{
10
+ if (name.length > maxIdentifierLength) {
11
+ throw new APIError(`Exceeded max identifier length for table or enum name of ${maxIdentifierLength} characters. Invalid name: ${name}.
12
+ Tip: You can use the dbName property to reduce the table name length.
13
+ `);
14
+ }
15
+ return name;
16
+ };
17
+
18
+ //# sourceMappingURL=validateIdentifierLength.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utilities/validateIdentifierLength.ts"],"sourcesContent":["import { APIError } from 'payload'\n\n/** Postgres max identifier length (NAMEDATALEN - 1). */\nexport const maxIdentifierLength = 63\n\n/**\n * Cap for builder-generated identifiers (`buildIndexName`/`buildForeignKeyName`). Sits\n * below `maxIdentifierLength` to leave headroom for the appended `_idx`/`_fk`/`_N` suffixes.\n */\nexport const maxGeneratedIdentifierLength = maxIdentifierLength - 3\n\n/**\n * Throws if a table or enum identifier exceeds the Postgres 63-char limit.\n */\nexport const validateIdentifierLength = (name: string): string => {\n if (name.length > maxIdentifierLength) {\n throw new APIError(\n `Exceeded max identifier length for table or enum name of ${maxIdentifierLength} characters. Invalid name: ${name}.\nTip: You can use the dbName property to reduce the table name length.\n `,\n )\n }\n\n return name\n}\n"],"names":["APIError","maxIdentifierLength","maxGeneratedIdentifierLength","validateIdentifierLength","name","length"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAS;AAElC,sDAAsD,GACtD,OAAO,MAAMC,sBAAsB,GAAE;AAErC;;;CAGC,GACD,OAAO,MAAMC,+BAA+BD,sBAAsB,EAAC;AAEnE;;CAEC,GACD,OAAO,MAAME,2BAA2B,CAACC;IACvC,IAAIA,KAAKC,MAAM,GAAGJ,qBAAqB;QACrC,MAAM,IAAID,SACR,CAAC,yDAAyD,EAAEC,oBAAoB,2BAA2B,EAAEG,KAAK;;MAElH,CAAC;IAEL;IAEA,OAAOA;AACT,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/drizzle",
3
- "version": "4.0.0-internal.697830c",
3
+ "version": "4.0.0-internal.77191e5",
4
4
  "description": "A library of shared functions used by different payload database adapters",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -55,10 +55,10 @@
55
55
  "@types/pg": "8.20.0",
56
56
  "@types/to-snake-case": "1.0.0",
57
57
  "@payloadcms/eslint-config": "3.28.0",
58
- "payload": "4.0.0-internal.697830c"
58
+ "payload": "4.0.0-internal.77191e5"
59
59
  },
60
60
  "peerDependencies": {
61
- "payload": "4.0.0-internal.697830c"
61
+ "payload": "4.0.0-internal.77191e5"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "pnpm build:swc && pnpm build:types",
@@ -1,42 +0,0 @@
1
- import { ValidationError } from 'payload';
2
- import { describe, expect, it } from 'vitest';
3
- import { handleUpsertError } from './handleUpsertError.js';
4
- const adapter = {
5
- fieldConstraints: {}
6
- };
7
- describe('handleUpsertError', ()=>{
8
- it('preserves the failing sub-table name on the ValidationError', ()=>{
9
- const pgError = {
10
- code: '23505',
11
- constraint: 'ultrasonic_avail_country_pkey',
12
- detail: 'Key (id)=(6a27e2a63f4b64567370f595) already exists.'
13
- };
14
- let thrown;
15
- try {
16
- handleUpsertError({
17
- adapter,
18
- collectionSlug: 'ultrasonic',
19
- error: pgError,
20
- tableName: 'ultrasonic_avail_country'
21
- });
22
- } catch (error) {
23
- thrown = error;
24
- }
25
- expect(thrown).toBeInstanceOf(ValidationError);
26
- const validationError = thrown;
27
- const fieldError = validationError.data.errors[0];
28
- expect(fieldError.path).toBe('id');
29
- expect(fieldError.tableName).toBe('ultrasonic_avail_country');
30
- });
31
- it('re-throws non unique-constraint errors unchanged', ()=>{
32
- const otherError = new Error('some other db error');
33
- expect(()=>handleUpsertError({
34
- adapter,
35
- collectionSlug: 'ultrasonic',
36
- error: otherError,
37
- tableName: 'ultrasonic_avail_country'
38
- })).toThrow(otherError);
39
- });
40
- });
41
-
42
- //# sourceMappingURL=handleUpsertError.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/upsertRow/handleUpsertError.spec.ts"],"sourcesContent":["import { ValidationError } from 'payload'\nimport { describe, expect, it } from 'vitest'\n\nimport type { DrizzleAdapter } from '../types.js'\n\nimport { handleUpsertError } from './handleUpsertError.js'\n\nconst adapter = { fieldConstraints: {} } as unknown as DrizzleAdapter\n\ndescribe('handleUpsertError', () => {\n it('preserves the failing sub-table name on the ValidationError', () => {\n const pgError = {\n code: '23505',\n constraint: 'ultrasonic_avail_country_pkey',\n detail: 'Key (id)=(6a27e2a63f4b64567370f595) already exists.',\n }\n\n let thrown: unknown\n try {\n handleUpsertError({\n adapter,\n collectionSlug: 'ultrasonic',\n error: pgError,\n tableName: 'ultrasonic_avail_country',\n })\n } catch (error) {\n thrown = error\n }\n\n expect(thrown).toBeInstanceOf(ValidationError)\n const validationError = thrown as ValidationError\n const fieldError = validationError.data.errors[0]!\n expect(fieldError.path).toBe('id')\n expect(fieldError.tableName).toBe('ultrasonic_avail_country')\n })\n\n it('re-throws non unique-constraint errors unchanged', () => {\n const otherError = new Error('some other db error')\n\n expect(() =>\n handleUpsertError({\n adapter,\n collectionSlug: 'ultrasonic',\n error: otherError,\n tableName: 'ultrasonic_avail_country',\n }),\n ).toThrow(otherError)\n })\n})\n"],"names":["ValidationError","describe","expect","it","handleUpsertError","adapter","fieldConstraints","pgError","code","constraint","detail","thrown","collectionSlug","error","tableName","toBeInstanceOf","validationError","fieldError","data","errors","path","toBe","otherError","Error","toThrow"],"mappings":"AAAA,SAASA,eAAe,QAAQ,UAAS;AACzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAQ;AAI7C,SAASC,iBAAiB,QAAQ,yBAAwB;AAE1D,MAAMC,UAAU;IAAEC,kBAAkB,CAAC;AAAE;AAEvCL,SAAS,qBAAqB;IAC5BE,GAAG,+DAA+D;QAChE,MAAMI,UAAU;YACdC,MAAM;YACNC,YAAY;YACZC,QAAQ;QACV;QAEA,IAAIC;QACJ,IAAI;YACFP,kBAAkB;gBAChBC;gBACAO,gBAAgB;gBAChBC,OAAON;gBACPO,WAAW;YACb;QACF,EAAE,OAAOD,OAAO;YACdF,SAASE;QACX;QAEAX,OAAOS,QAAQI,cAAc,CAACf;QAC9B,MAAMgB,kBAAkBL;QACxB,MAAMM,aAAaD,gBAAgBE,IAAI,CAACC,MAAM,CAAC,EAAE;QACjDjB,OAAOe,WAAWG,IAAI,EAAEC,IAAI,CAAC;QAC7BnB,OAAOe,WAAWH,SAAS,EAAEO,IAAI,CAAC;IACpC;IAEAlB,GAAG,oDAAoD;QACrD,MAAMmB,aAAa,IAAIC,MAAM;QAE7BrB,OAAO,IACLE,kBAAkB;gBAChBC;gBACAO,gBAAgB;gBAChBC,OAAOS;gBACPR,WAAW;YACb,IACAU,OAAO,CAACF;IACZ;AACF"}
@@ -1,15 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { isValidStringID } from './isValidStringID.js';
3
- describe('isValidStringID', ()=>{
4
- it('should pass', ()=>{
5
- expect(isValidStringID('1')).toBe(true);
6
- expect(isValidStringID('a_b_c')).toBe(true);
7
- expect(isValidStringID('8cc2df6d-6e07-4da4-be48-5fa747c3b92b')).toBe(true);
8
- });
9
- it('should not pass', ()=>{
10
- expect(isValidStringID('1 2 3')).toBe(false);
11
- expect(isValidStringID('1@')).toBe(false);
12
- });
13
- });
14
-
15
- //# sourceMappingURL=isValidStringID.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utilities/isValidStringID.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\nimport { isValidStringID } from './isValidStringID.js'\n\ndescribe('isValidStringID', () => {\n it('should pass', () => {\n expect(isValidStringID('1')).toBe(true)\n expect(isValidStringID('a_b_c')).toBe(true)\n expect(isValidStringID('8cc2df6d-6e07-4da4-be48-5fa747c3b92b')).toBe(true)\n })\n\n it('should not pass', () => {\n expect(isValidStringID('1 2 3')).toBe(false)\n expect(isValidStringID('1@')).toBe(false)\n })\n})\n"],"names":["describe","it","expect","isValidStringID","toBe"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ,SAAQ;AAC7C,SAASC,eAAe,QAAQ,uBAAsB;AAEtDH,SAAS,mBAAmB;IAC1BC,GAAG,eAAe;QAChBC,OAAOC,gBAAgB,MAAMC,IAAI,CAAC;QAClCF,OAAOC,gBAAgB,UAAUC,IAAI,CAAC;QACtCF,OAAOC,gBAAgB,yCAAyCC,IAAI,CAAC;IACvE;IAEAH,GAAG,mBAAmB;QACpBC,OAAOC,gBAAgB,UAAUC,IAAI,CAAC;QACtCF,OAAOC,gBAAgB,OAAOC,IAAI,CAAC;IACrC;AACF"}