@payloadcms/db-sqlite 3.0.0-beta.76 → 3.0.0-beta.78
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.
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMigrationTemplate.d.ts","sourceRoot":"","sources":["../src/getMigrationTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,oBAAoB,iCAI9B,qBAAqB,KAAG,MAS1B,CAAA"}
|
|
1
|
+
{"version":3,"file":"getMigrationTemplate.d.ts","sourceRoot":"","sources":["../src/getMigrationTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,MAAM,SAAU,MAAM,WAIpB,CAAA;AAEf,eAAO,MAAM,oBAAoB,iCAI9B,qBAAqB,KAAG,MAS1B,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
export const indent = (text)=>text.split('\n').map((line)=>` ${line}`).join('\n');
|
|
1
2
|
export const getMigrationTemplate = ({ downSQL, imports, upSQL })=>`import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-sqlite'
|
|
2
3
|
${imports ? `${imports}\n` : ''}
|
|
3
4
|
export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
|
|
4
|
-
${upSQL}
|
|
5
|
+
${indent(upSQL)}
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
|
|
8
|
-
${downSQL}
|
|
9
|
+
${indent(downSQL)}
|
|
9
10
|
}
|
|
10
11
|
`;
|
|
11
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/getMigrationTemplate.ts"],"sourcesContent":["import type { MigrationTemplateArgs } from 'payload'\n\nexport const getMigrationTemplate = ({\n downSQL,\n imports,\n upSQL,\n}: MigrationTemplateArgs): string => `import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-sqlite'\n${imports ? `${imports}\\n` : ''}\nexport async function up({ payload, req }: MigrateUpArgs): Promise<void> {\n${upSQL}\n}\n\nexport async function down({ payload, req }: MigrateDownArgs): Promise<void> {\n${downSQL}\n}\n`\n"],"names":["getMigrationTemplate","downSQL","imports","upSQL"],"mappings":"AAEA,OAAO,MAAMA,uBAAuB,CAAC,EACnCC,OAAO,EACPC,OAAO,EACPC,KAAK,EACiB,GAAa,CAAC;AACtC,EAAED,UAAU,CAAC,EAAEA,QAAQ,EAAE,CAAC,GAAG,GAAG;;AAEhC,
|
|
1
|
+
{"version":3,"sources":["../src/getMigrationTemplate.ts"],"sourcesContent":["import type { MigrationTemplateArgs } from 'payload'\n\nexport const indent = (text: string) =>\n text\n .split('\\n')\n .map((line) => ` ${line}`)\n .join('\\n')\n\nexport const getMigrationTemplate = ({\n downSQL,\n imports,\n upSQL,\n}: MigrationTemplateArgs): string => `import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-sqlite'\n${imports ? `${imports}\\n` : ''}\nexport async function up({ payload, req }: MigrateUpArgs): Promise<void> {\n${indent(upSQL)}\n}\n\nexport async function down({ payload, req }: MigrateDownArgs): Promise<void> {\n${indent(downSQL)}\n}\n`\n"],"names":["indent","text","split","map","line","join","getMigrationTemplate","downSQL","imports","upSQL"],"mappings":"AAEA,OAAO,MAAMA,SAAS,CAACC,OACrBA,KACGC,KAAK,CAAC,MACNC,GAAG,CAAC,CAACC,OAAS,CAAC,EAAE,EAAEA,KAAK,CAAC,EACzBC,IAAI,CAAC,MAAK;AAEf,OAAO,MAAMC,uBAAuB,CAAC,EACnCC,OAAO,EACPC,OAAO,EACPC,KAAK,EACiB,GAAa,CAAC;AACtC,EAAED,UAAU,CAAC,EAAEA,QAAQ,EAAE,CAAC,GAAG,GAAG;;AAEhC,EAAER,OAAOS,OAAO;;;;AAIhB,EAAET,OAAOO,SAAS;;AAElB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/db-sqlite",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.78",
|
|
4
4
|
"description": "The officially supported SQLite database adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"prompts": "2.4.2",
|
|
43
43
|
"to-snake-case": "1.0.0",
|
|
44
44
|
"uuid": "9.0.0",
|
|
45
|
-
"@payloadcms/drizzle": "3.0.0-beta.
|
|
45
|
+
"@payloadcms/drizzle": "3.0.0-beta.78"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/pg": "8.10.2",
|
|
49
49
|
"@types/to-snake-case": "1.0.0",
|
|
50
50
|
"@payloadcms/eslint-config": "3.0.0-beta.59",
|
|
51
|
-
"payload": "3.0.0-beta.
|
|
51
|
+
"payload": "3.0.0-beta.78"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"payload": "3.0.0-beta.
|
|
54
|
+
"payload": "3.0.0-beta.78"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "pnpm build:swc && pnpm build:types",
|