@payloadcms/db-postgres 0.1.0-beta.7 → 0.1.0-beta.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.d.ts +3 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +4 -6
- package/dist/create.d.ts +3 -0
- package/dist/create.d.ts.map +1 -0
- package/dist/createGlobal.d.ts +5 -0
- package/dist/createGlobal.d.ts.map +1 -0
- package/dist/createGlobalVersion.d.ts +6 -0
- package/dist/createGlobalVersion.d.ts.map +1 -0
- package/dist/createMigration.d.ts +3 -0
- package/dist/createMigration.d.ts.map +1 -0
- package/dist/createVersion.d.ts +5 -0
- package/dist/createVersion.d.ts.map +1 -0
- package/dist/deleteMany.d.ts +3 -0
- package/dist/deleteMany.d.ts.map +1 -0
- package/dist/deleteOne.d.ts +3 -0
- package/dist/deleteOne.d.ts.map +1 -0
- package/dist/deleteVersions.d.ts +3 -0
- package/dist/deleteVersions.d.ts.map +1 -0
- package/dist/destroy.d.ts +3 -0
- package/dist/destroy.d.ts.map +1 -0
- package/dist/find/buildFindManyArgs.d.ts +13 -0
- package/dist/find/buildFindManyArgs.d.ts.map +1 -0
- package/dist/find/chainMethods.d.ts +15 -0
- package/dist/find/chainMethods.d.ts.map +1 -0
- package/dist/find/findMany.d.ts +22 -0
- package/dist/find/findMany.d.ts.map +1 -0
- package/dist/find/traverseFields.d.ts +16 -0
- package/dist/find/traverseFields.d.ts.map +1 -0
- package/dist/find.d.ts +3 -0
- package/dist/find.d.ts.map +1 -0
- package/dist/findGlobal.d.ts +3 -0
- package/dist/findGlobal.d.ts.map +1 -0
- package/dist/findGlobalVersions.d.ts +3 -0
- package/dist/findGlobalVersions.d.ts.map +1 -0
- package/dist/findOne.d.ts +5 -0
- package/dist/findOne.d.ts.map +1 -0
- package/dist/findVersions.d.ts +3 -0
- package/dist/findVersions.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/init.d.ts +3 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/migrate.d.ts +3 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrateStatus.d.ts +3 -0
- package/dist/migrateStatus.d.ts.map +1 -0
- package/dist/queries/buildAndOrConditions.d.ts +17 -0
- package/dist/queries/buildAndOrConditions.d.ts.map +1 -0
- package/dist/queries/buildQuery.d.ts +30 -0
- package/dist/queries/buildQuery.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts +2 -0
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts +2 -0
- package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/index.d.ts +10 -0
- package/dist/queries/createJSONQuery/index.d.ts.map +1 -0
- package/dist/queries/getTableColumnFromPath.d.ts +40 -0
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -0
- package/dist/queries/operatorMap.d.ts +18 -0
- package/dist/queries/operatorMap.d.ts.map +1 -0
- package/dist/queries/parseParams.d.ts +17 -0
- package/dist/queries/parseParams.d.ts.map +1 -0
- package/dist/queries/sanitizeQueryValue.d.ts +12 -0
- package/dist/queries/sanitizeQueryValue.d.ts.map +1 -0
- package/dist/queryDrafts.d.ts +3 -0
- package/dist/queryDrafts.d.ts.map +1 -0
- package/dist/reference.d.ts +2 -0
- package/dist/reference.d.ts.map +1 -0
- package/dist/schema/build.d.ts +22 -0
- package/dist/schema/build.d.ts.map +1 -0
- package/dist/schema/build.js +4 -4
- package/dist/schema/createIndex.d.ts +11 -0
- package/dist/schema/createIndex.d.ts.map +1 -0
- package/dist/schema/parentIDColumnMap.d.ts +7 -0
- package/dist/schema/parentIDColumnMap.d.ts.map +1 -0
- package/dist/schema/traverseFields.d.ts +32 -0
- package/dist/schema/traverseFields.d.ts.map +1 -0
- package/dist/schema/traverseFields.js +8 -8
- package/dist/schema/validateExistingBlockIsIdentical.d.ts +11 -0
- package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -0
- package/dist/transactions/beginTransaction.d.ts +3 -0
- package/dist/transactions/beginTransaction.d.ts.map +1 -0
- package/dist/transactions/commitTransaction.d.ts +3 -0
- package/dist/transactions/commitTransaction.d.ts.map +1 -0
- package/dist/transactions/rollbackTransaction.d.ts +3 -0
- package/dist/transactions/rollbackTransaction.d.ts.map +1 -0
- package/dist/transform/read/hasManyNumber.d.ts +10 -0
- package/dist/transform/read/hasManyNumber.d.ts.map +1 -0
- package/dist/transform/read/index.d.ts +12 -0
- package/dist/transform/read/index.d.ts.map +1 -0
- package/dist/transform/read/relationship.d.ts +10 -0
- package/dist/transform/read/relationship.d.ts.map +1 -0
- package/dist/transform/read/traverseFields.d.ts +44 -0
- package/dist/transform/read/traverseFields.d.ts.map +1 -0
- package/dist/transform/write/array.d.ts +22 -0
- package/dist/transform/write/array.d.ts.map +1 -0
- package/dist/transform/write/blocks.d.ts +21 -0
- package/dist/transform/write/blocks.d.ts.map +1 -0
- package/dist/transform/write/index.d.ts +11 -0
- package/dist/transform/write/index.d.ts.map +1 -0
- package/dist/transform/write/numbers.d.ts +8 -0
- package/dist/transform/write/numbers.d.ts.map +1 -0
- package/dist/transform/write/relationships.d.ts +10 -0
- package/dist/transform/write/relationships.d.ts.map +1 -0
- package/dist/transform/write/selects.d.ts +7 -0
- package/dist/transform/write/selects.d.ts.map +1 -0
- package/dist/transform/write/traverseFields.d.ts +46 -0
- package/dist/transform/write/traverseFields.d.ts.map +1 -0
- package/dist/transform/write/types.d.ts +41 -0
- package/dist/transform/write/types.d.ts.map +1 -0
- package/dist/types.d.ts +67 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/update.d.ts +3 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/updateGlobal.d.ts +5 -0
- package/dist/updateGlobal.d.ts.map +1 -0
- package/dist/updateGlobalVersion.d.ts +6 -0
- package/dist/updateGlobalVersion.d.ts.map +1 -0
- package/dist/updateVersion.d.ts +5 -0
- package/dist/updateVersion.d.ts.map +1 -0
- package/dist/upsertRow/deleteExistingArrayRows.d.ts +10 -0
- package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +1 -0
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts +14 -0
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +1 -0
- package/dist/upsertRow/index.d.ts +4 -0
- package/dist/upsertRow/index.d.ts.map +1 -0
- package/dist/upsertRow/insertArrays.d.ts +13 -0
- package/dist/upsertRow/insertArrays.d.ts.map +1 -0
- package/dist/upsertRow/types.d.ts +26 -0
- package/dist/upsertRow/types.d.ts.map +1 -0
- package/dist/utilities/appendPrefixToKeys.d.ts +2 -0
- package/dist/utilities/appendPrefixToKeys.d.ts.map +1 -0
- package/dist/utilities/createBlocksMap.d.ts +5 -0
- package/dist/utilities/createBlocksMap.d.ts.map +1 -0
- package/dist/utilities/createMigrationTable.d.ts +3 -0
- package/dist/utilities/createMigrationTable.d.ts.map +1 -0
- package/dist/utilities/createRelationshipMap.d.ts +2 -0
- package/dist/utilities/createRelationshipMap.d.ts.map +1 -0
- package/dist/utilities/hasLocalesTable.d.ts +3 -0
- package/dist/utilities/hasLocalesTable.d.ts.map +1 -0
- package/dist/utilities/isArrayOfRows.d.ts +2 -0
- package/dist/utilities/isArrayOfRows.d.ts.map +1 -0
- package/dist/utilities/migrationTableExists.d.ts +3 -0
- package/dist/utilities/migrationTableExists.d.ts.map +1 -0
- package/dist/webpack.d.ts +3 -0
- package/dist/webpack.d.ts.map +1 -0
- package/package.json +3 -3
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { ArrayField } from 'payload/types';
|
2
|
+
import type { ArrayRowToInsert, BlockRowToInsert, RelationshipToDelete } from './types';
|
3
|
+
type Args = {
|
4
|
+
arrayTableName: string;
|
5
|
+
baseTableName: string;
|
6
|
+
blocks: {
|
7
|
+
[blockType: string]: BlockRowToInsert[];
|
8
|
+
};
|
9
|
+
data: unknown;
|
10
|
+
field: ArrayField;
|
11
|
+
locale?: string;
|
12
|
+
numbers: Record<string, unknown>[];
|
13
|
+
path: string;
|
14
|
+
relationships: Record<string, unknown>[];
|
15
|
+
relationshipsToDelete: RelationshipToDelete[];
|
16
|
+
selects: {
|
17
|
+
[tableName: string]: Record<string, unknown>[];
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const transformArray: ({ arrayTableName, baseTableName, blocks, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, }: Args) => ArrayRowToInsert[];
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=array.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/transform/write/array.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKvF,KAAK,IAAI,GAAG;IACV,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;CACF,CAAA;AAED,eAAO,MAAM,cAAc,kIAYxB,IAAI,uBA8CN,CAAA"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { BlockField } from 'payload/types';
|
2
|
+
import type { BlockRowToInsert, RelationshipToDelete } from './types';
|
3
|
+
type Args = {
|
4
|
+
baseTableName: string;
|
5
|
+
blocks: {
|
6
|
+
[blockType: string]: BlockRowToInsert[];
|
7
|
+
};
|
8
|
+
data: Record<string, unknown>[];
|
9
|
+
field: BlockField;
|
10
|
+
locale?: string;
|
11
|
+
numbers: Record<string, unknown>[];
|
12
|
+
path: string;
|
13
|
+
relationships: Record<string, unknown>[];
|
14
|
+
relationshipsToDelete: RelationshipToDelete[];
|
15
|
+
selects: {
|
16
|
+
[tableName: string]: Record<string, unknown>[];
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare const transformBlocks: ({ baseTableName, blocks, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, }: Args) => void;
|
20
|
+
export {};
|
21
|
+
//# sourceMappingURL=blocks.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../src/transform/write/blocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAIrE,KAAK,IAAI,GAAG;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC/B,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;CACF,CAAA;AACD,eAAO,MAAM,eAAe,kHAWzB,IAAI,SA0CN,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Field } from 'payload/types';
|
2
|
+
import type { RowToInsert } from './types';
|
3
|
+
type Args = {
|
4
|
+
data: Record<string, unknown>;
|
5
|
+
fields: Field[];
|
6
|
+
path?: string;
|
7
|
+
tableName: string;
|
8
|
+
};
|
9
|
+
export declare const transformForWrite: ({ data, fields, path, tableName }: Args) => RowToInsert;
|
10
|
+
export {};
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,sCAA4C,IAAI,KAAG,WAkChF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../../src/transform/write/numbers.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,gBAAgB,+BAAgC,IAAI,SAQhE,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { RelationshipField, UploadField } from 'payload/types';
|
2
|
+
type Args = {
|
3
|
+
baseRow: Record<string, unknown>;
|
4
|
+
data: unknown;
|
5
|
+
field: RelationshipField | UploadField;
|
6
|
+
relationships: Record<string, unknown>[];
|
7
|
+
};
|
8
|
+
export declare const transformRelationship: ({ baseRow, data, field, relationships }: Args) => void;
|
9
|
+
export {};
|
10
|
+
//# sourceMappingURL=relationships.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/transform/write/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAInE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,iBAAiB,GAAG,WAAW,CAAA;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAA6C,IAAI,SAiBlF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"selects.d.ts","sourceRoot":"","sources":["../../../src/transform/write/selects.ts"],"names":[],"mappings":"AAGA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,gBAAgB,qBAAsB,IAAI,8BAmBtD,CAAA"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Field } from 'payload/types';
|
2
|
+
import type { ArrayRowToInsert, BlockRowToInsert, RelationshipToDelete } from './types';
|
3
|
+
type Args = {
|
4
|
+
arrays: {
|
5
|
+
[tableName: string]: ArrayRowToInsert[];
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* This is the name of the base table
|
9
|
+
*/
|
10
|
+
baseTableName: string;
|
11
|
+
blocks: {
|
12
|
+
[blockType: string]: BlockRowToInsert[];
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* A snake-case field prefix, representing prior fields
|
16
|
+
* Ex: my_group_my_named_tab_
|
17
|
+
*/
|
18
|
+
columnPrefix: string;
|
19
|
+
data: Record<string, unknown>;
|
20
|
+
existingLocales?: Record<string, unknown>[];
|
21
|
+
/**
|
22
|
+
* A prefix that will retain camel-case formatting, representing prior fields
|
23
|
+
* Ex: myGroup_myNamedTab_
|
24
|
+
*/
|
25
|
+
fieldPrefix: string;
|
26
|
+
fields: Field[];
|
27
|
+
forcedLocale?: string;
|
28
|
+
locales: {
|
29
|
+
[locale: string]: Record<string, unknown>;
|
30
|
+
};
|
31
|
+
numbers: Record<string, unknown>[];
|
32
|
+
/**
|
33
|
+
* This is the name of the parent table
|
34
|
+
*/
|
35
|
+
parentTableName: string;
|
36
|
+
path: string;
|
37
|
+
relationships: Record<string, unknown>[];
|
38
|
+
relationshipsToDelete: RelationshipToDelete[];
|
39
|
+
row: Record<string, unknown>;
|
40
|
+
selects: {
|
41
|
+
[tableName: string]: Record<string, unknown>[];
|
42
|
+
};
|
43
|
+
};
|
44
|
+
export declare const traverseFields: ({ arrays, baseTableName, blocks, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects, }: Args) => void;
|
45
|
+
export {};
|
46
|
+
//# sourceMappingURL=traverseFields.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/write/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CA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|
|
1
|
+
export type ArrayRowToInsert = {
|
2
|
+
arrays: {
|
3
|
+
[tableName: string]: ArrayRowToInsert[];
|
4
|
+
};
|
5
|
+
locales: {
|
6
|
+
[locale: string]: Record<string, unknown>;
|
7
|
+
};
|
8
|
+
row: Record<string, unknown>;
|
9
|
+
};
|
10
|
+
export type BlockRowToInsert = {
|
11
|
+
arrays: {
|
12
|
+
[tableName: string]: ArrayRowToInsert[];
|
13
|
+
};
|
14
|
+
locales: {
|
15
|
+
[locale: string]: Record<string, unknown>;
|
16
|
+
};
|
17
|
+
row: Record<string, unknown>;
|
18
|
+
};
|
19
|
+
export type RelationshipToDelete = {
|
20
|
+
locale?: string;
|
21
|
+
path: string;
|
22
|
+
};
|
23
|
+
export type RowToInsert = {
|
24
|
+
arrays: {
|
25
|
+
[tableName: string]: ArrayRowToInsert[];
|
26
|
+
};
|
27
|
+
blocks: {
|
28
|
+
[blockType: string]: BlockRowToInsert[];
|
29
|
+
};
|
30
|
+
locales: {
|
31
|
+
[locale: string]: Record<string, unknown>;
|
32
|
+
};
|
33
|
+
numbers: Record<string, unknown>[];
|
34
|
+
relationships: Record<string, unknown>[];
|
35
|
+
relationshipsToDelete: RelationshipToDelete[];
|
36
|
+
row: Record<string, unknown>;
|
37
|
+
selects: {
|
38
|
+
[tableName: string]: Record<string, unknown>[];
|
39
|
+
};
|
40
|
+
};
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/transform/write/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,GAAG,EAAE,MAAM,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izzle-orm';
|
2
|
+
import type { NodePgDatabase, NodePgQueryResultHKT } from 'drizzle-orm/node-postgres';
|
3
|
+
import type { PgColumn, PgEnum, PgTableWithColumns, PgTransaction } from 'drizzle-orm/pg-core';
|
4
|
+
import type { Payload } from 'payload';
|
5
|
+
import type { BaseDatabaseAdapter } from 'payload/database';
|
6
|
+
import type { Pool, PoolConfig } from 'pg';
|
7
|
+
export type DrizzleDB = NodePgDatabase<Record<string, unknown>>;
|
8
|
+
export type Args = {
|
9
|
+
client: PoolConfig;
|
10
|
+
migrationDir?: string;
|
11
|
+
migrationName?: string;
|
12
|
+
};
|
13
|
+
export type GenericColumn = PgColumn<ColumnBaseConfig<ColumnDataType, string>, Record<string, unknown>>;
|
14
|
+
export type GenericColumns = {
|
15
|
+
[x: string]: GenericColumn;
|
16
|
+
};
|
17
|
+
export type GenericTable = PgTableWithColumns<{
|
18
|
+
columns: GenericColumns;
|
19
|
+
dialect: string;
|
20
|
+
name: string;
|
21
|
+
schema: undefined;
|
22
|
+
}>;
|
23
|
+
export type GenericEnum = PgEnum<[string, ...string[]]>;
|
24
|
+
export type GenericRelation = Relations<string, Record<string, Relation<string>>>;
|
25
|
+
export type DrizzleTransaction = PgTransaction<NodePgQueryResultHKT, Record<string, unknown>, ExtractTablesWithRelations<Record<string, unknown>>>;
|
26
|
+
export type PostgresAdapter = BaseDatabaseAdapter & Args & {
|
27
|
+
drizzle: DrizzleDB;
|
28
|
+
enums: Record<string, GenericEnum>;
|
29
|
+
pool: Pool;
|
30
|
+
relations: Record<string, GenericRelation>;
|
31
|
+
schema: Record<string, GenericEnum | GenericRelation | GenericTable>;
|
32
|
+
sessions: {
|
33
|
+
[id: string]: {
|
34
|
+
db: DrizzleTransaction;
|
35
|
+
reject: () => void;
|
36
|
+
resolve: () => void;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
tables: Record<string, GenericTable>;
|
40
|
+
};
|
41
|
+
export type PostgresAdapterResult = (args: {
|
42
|
+
payload: Payload;
|
43
|
+
}) => PostgresAdapter;
|
44
|
+
export type MigrateUpArgs = {
|
45
|
+
payload: Payload;
|
46
|
+
};
|
47
|
+
export type MigrateDownArgs = {
|
48
|
+
payload: Payload;
|
49
|
+
};
|
50
|
+
declare module 'payload' {
|
51
|
+
interface DatabaseAdapter extends Args {
|
52
|
+
drizzle: DrizzleDB;
|
53
|
+
enums: Record<string, GenericEnum>;
|
54
|
+
pool: Pool;
|
55
|
+
relations: Record<string, GenericRelation>;
|
56
|
+
schema: Record<string, GenericEnum | GenericRelation | GenericTable>;
|
57
|
+
sessions: {
|
58
|
+
[id: string]: {
|
59
|
+
db: DrizzleTransaction;
|
60
|
+
reject: () => void;
|
61
|
+
resolve: () => void;
|
62
|
+
};
|
63
|
+
};
|
64
|
+
tables: Record<string, GenericTable>;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,0BAA0B,EAC1B,QAAQ,EACR,SAAS,EACV,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAE/D,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,E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,kBAAkB,CAAA;AASjD,eAAO,MAAM,SAAS,EAAE,SA6BvB,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { UpdateGlobalArgs } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from './types';
|
4
|
+
export declare function updateGlobal<T extends TypeWithID>(this: PostgresAdapter, { data, req, slug }: UpdateGlobalArgs): Promise<T>;
|
5
|
+
//# sourceMappingURL=updateGlobal.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateGlobal.d.ts","sourceRoot":"","sources":["../src/updateGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,YAAY,CAAC,CAAC,SAAS,UAAU,EACrD,IAAI,EAAE,eAAe,EACrB,EAAE,IAAI,EAAE,GAA0B,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAC3D,OAAO,CAAC,CAAC,CAAC,CAiBZ"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { TypeWithVersion } from 'payload/database';
|
2
|
+
import type { UpdateGlobalVersionArgs } from 'payload/database';
|
3
|
+
import type { TypeWithID } from 'payload/types';
|
4
|
+
import type { PostgresAdapter } from './types';
|
5
|
+
export declare function updateGlobalVersion<T extends TypeWithID>(this: PostgresAdapter, { id, global, locale, req, versionData, where: whereArg, }: UpdateGlobalVersionArgs<T>): Promise<TypeWithVersion<T>>;
|
6
|
+
//# sourceMappingURL=updateGlobalVersion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateGlobalVersion.d.ts","sourceRoot":"","sources":["../src/updateGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,KAAK,EAAyC,UAAU,EAAE,MAAM,eAAe,CAAA;AAKtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAC5D,IAAI,EAAE,eAAe,EACrB,EACE,EAAE,EACF,MAAM,EACN,MAAM,EACN,GAA0B,EAC1B,WAAW,EACX,KAAK,EAAE,QAAQ,GAChB,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BA8B9B"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { TypeWithVersion, UpdateVersionArgs } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from './types';
|
4
|
+
export declare function updateVersion<T extends TypeWithID>(this: PostgresAdapter, { id, collection, locale, req, versionData, where: whereArg, }: UpdateVersionArgs<T>): Promise<TypeWithVersion<T>>;
|
5
|
+
//# sourceMappingURL=updateVersion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateVersion.d.ts","sourceRoot":"","sources":["../src/updateVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAK1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,aAAa,CAAC,CAAC,SAAS,UAAU,EACtD,IAAI,EAAE,eAAe,EACrB,EACE,EAAE,EACF,UAAU,EACV,MAAM,EACN,GAA0B,EAC1B,WAAW,EACX,KAAK,EAAE,QAAQ,GAChB,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BA4BxB"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { DrizzleDB, PostgresAdapter } from '../types';
|
2
|
+
type Args = {
|
3
|
+
adapter: PostgresAdapter;
|
4
|
+
db: DrizzleDB;
|
5
|
+
parentID: unknown;
|
6
|
+
tableName: string;
|
7
|
+
};
|
8
|
+
export declare const deleteExistingArrayRows: ({ adapter, db, parentID, tableName, }: Args) => Promise<void>;
|
9
|
+
export {};
|
10
|
+
//# sourceMappingURL=deleteExistingArrayRows.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteExistingArrayRows.d.ts","sourceRoot":"","sources":["../../src/upsertRow/deleteExistingArrayRows.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,EAAE,EAAE,SAAS,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,uBAAuB,0CAKjC,IAAI,KAAG,QAAQ,IAAI,CAMrB,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { DrizzleDB, PostgresAdapter } from '../types';
|
2
|
+
type Args = {
|
3
|
+
adapter: PostgresAdapter;
|
4
|
+
db: DrizzleDB;
|
5
|
+
localeColumnName?: string;
|
6
|
+
parentColumnName?: string;
|
7
|
+
parentID: unknown;
|
8
|
+
pathColumnName?: string;
|
9
|
+
rows: Record<string, unknown>[];
|
10
|
+
tableName: string;
|
11
|
+
};
|
12
|
+
export declare const deleteExistingRowsByPath: ({ adapter, db, localeColumnName, parentColumnName, parentID, pathColumnName, rows, tableName, }: Args) => Promise<void>;
|
13
|
+
export {};
|
14
|
+
//# sourceMappingURL=deleteExistingRowsByPath.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteExistingRowsByPath.d.ts","sourceRoot":"","sources":["../../src/upsertRow/deleteExistingRowsByPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,EAAE,EAAE,SAAS,CAAA;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC/B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,wBAAwB,oGASlC,IAAI,KAAG,QAAQ,IAAI,CAkCrB,CAAA"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { TypeWithID } from 'payload/types';
|
2
|
+
import type { Args } from './types';
|
3
|
+
export declare const upsertRow: <T extends TypeWithID>({ id, adapter, data, db, fields, operation, path, tableName, upsertTarget, where, }: Args) => Promise<T>;
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upsertRow/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAK/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AASnC,eAAO,MAAM,SAAS,8GAWnB,IAAI,eA0QN,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { ArrayRowToInsert } from '../transform/write/types';
|
2
|
+
import type { DrizzleDB, PostgresAdapter } from '../types';
|
3
|
+
type Args = {
|
4
|
+
adapter: PostgresAdapter;
|
5
|
+
arrays: {
|
6
|
+
[tableName: string]: ArrayRowToInsert[];
|
7
|
+
}[];
|
8
|
+
db: DrizzleDB;
|
9
|
+
parentRows: Record<string, unknown>[];
|
10
|
+
};
|
11
|
+
export declare const insertArrays: ({ adapter, arrays, db, parentRows }: Args) => Promise<void>;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=insertArrays.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"insertArrays.d.ts","sourceRoot":"","sources":["../../src/upsertRow/insertArrays.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,EAAE,CAAA;IACH,EAAE,EAAE,SAAS,CAAA;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACtC,CAAA;AAYD,eAAO,MAAM,YAAY,wCAA+C,IAAI,KAAG,QAAQ,IAAI,CA2D1F,CAAA"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { SQL } from 'drizzle-orm';
|
2
|
+
import type { Field } from 'payload/types';
|
3
|
+
import type { DrizzleDB, GenericColumn, PostgresAdapter } from '../types';
|
4
|
+
type BaseArgs = {
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
data: Record<string, unknown>;
|
7
|
+
db: DrizzleDB;
|
8
|
+
fields: Field[];
|
9
|
+
path?: string;
|
10
|
+
tableName: string;
|
11
|
+
};
|
12
|
+
type CreateArgs = BaseArgs & {
|
13
|
+
id?: never;
|
14
|
+
operation: 'create';
|
15
|
+
upsertTarget?: never;
|
16
|
+
where?: never;
|
17
|
+
};
|
18
|
+
type UpdateArgs = BaseArgs & {
|
19
|
+
id?: number | string;
|
20
|
+
operation: 'update';
|
21
|
+
upsertTarget?: GenericColumn;
|
22
|
+
where?: SQL<unknown>;
|
23
|
+
};
|
24
|
+
export type Args = CreateArgs | UpdateArgs;
|
25
|
+
export {};
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upsertRow/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAEzE,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,EAAE,EAAE,SAAS,CAAA;IACb,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,UAAU,GAAG,QAAQ,GAAG;IAC3B,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,SAAS,EAAE,QAAQ,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,KAAK,UAAU,GAAG,QAAQ,GAAG;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,QAAQ,CAAA;IACnB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"appendPrefixToKeys.d.ts","sourceRoot":"","sources":["../../src/utilities/appendPrefixToKeys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,WAAY,OAAO,MAAM,EAAE,OAAO,CAAC,UAAU,MAAM,MAI3E,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createBlocksMap.d.ts","sourceRoot":"","sources":["../../src/utilities/createBlocksMap.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,OAAO,MAAM,EAAE,OAAO,CAAC,KAAG,SAmC/D,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createMigrationTable.d.ts","sourceRoot":"","sources":["../../src/utilities/createMigrationTable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,oBAAoB,qBAA0B,QAAQ,IAAI,CAStE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createRelationshipMap.d.ts","sourceRoot":"","sources":["../../src/utilities/createRelationshipMap.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,SAAU,OAAO,KAAG,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,CAmBrF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hasLocalesTable.d.ts","sourceRoot":"","sources":["../../src/utilities/hasLocalesTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAI1C,eAAO,MAAM,eAAe,WAAY,KAAK,EAAE,KAAG,OAOjD,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isArrayOfRows.d.ts","sourceRoot":"","sources":["../../src/utilities/isArrayOfRows.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE9E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrationTableExists.d.ts","sourceRoot":"","sources":["../../src/utilities/migrationTableExists.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,oBAAoB,qBAA0B,QAAQ,OAAO,CAMzE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,eAAO,MAAM,OAAO,EAAE,OAcrB,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "0.1.0-beta.
|
3
|
+
"version": "0.1.0-beta.9",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"repository": "https://github.com/payloadcms/payload",
|
6
6
|
"license": "MIT",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/pg": "8.10.2",
|
26
26
|
"@types/to-snake-case": "1.0.0",
|
27
|
-
"payload": "2.0.0-beta.
|
27
|
+
"payload": "2.0.0-beta.9",
|
28
28
|
"@payloadcms/eslint-config": "0.0.1"
|
29
29
|
},
|
30
30
|
"peerDependencies": {
|
@@ -40,6 +40,6 @@
|
|
40
40
|
"build": "pnpm build:swc && pnpm build:types",
|
41
41
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
42
42
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
43
|
-
"clean": "rimraf dist"
|
43
|
+
"clean": "rimraf {dist,*.tsbuildinfo}"
|
44
44
|
}
|
45
45
|
}
|