@webiny/api-prerendering-service-so-ddb 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d
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/definitions/queueJob.d.ts +4 -3
- package/definitions/queueJob.js +8 -12
- package/definitions/queueJob.js.map +1 -1
- package/definitions/render.d.ts +4 -3
- package/definitions/render.js +8 -12
- package/definitions/render.js.map +1 -1
- package/definitions/renderLegacy.d.ts +4 -3
- package/definitions/renderLegacy.js +8 -12
- package/definitions/renderLegacy.js.map +1 -1
- package/definitions/settings.d.ts +4 -3
- package/definitions/settings.js +8 -12
- package/definitions/settings.js.map +1 -1
- package/definitions/table.d.ts +5 -5
- package/definitions/table.js +7 -6
- package/definitions/table.js.map +1 -1
- package/definitions/tagPathLink.d.ts +51 -4
- package/definitions/tagPathLink.js +8 -12
- package/definitions/tagPathLink.js.map +1 -1
- package/definitions/tagPathLinkLegacy.d.ts +57 -4
- package/definitions/tagPathLinkLegacy.js +8 -12
- package/definitions/tagPathLinkLegacy.js.map +1 -1
- package/definitions/tenantEntity.d.ts +8 -0
- package/definitions/tenantEntity.js +39 -0
- package/definitions/tenantEntity.js.map +1 -0
- package/index.d.ts +1 -1
- package/index.js +24 -30
- package/index.js.map +1 -1
- package/operations/queueJob.d.ts +2 -2
- package/operations/queueJob.js +21 -35
- package/operations/queueJob.js.map +1 -1
- package/operations/render.d.ts +4 -5
- package/operations/render.js +67 -112
- package/operations/render.js.map +1 -1
- package/operations/settings.d.ts +2 -2
- package/operations/settings.js +12 -19
- package/operations/settings.js.map +1 -1
- package/operations/tenant.d.ts +6 -0
- package/operations/tenant.js +29 -0
- package/operations/tenant.js.map +1 -0
- package/package.json +16 -31
- package/types.d.ts +12 -12
- package/types.js +6 -5
- package/types.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_query","require","createTenantStorageOperations","params","entity","getTenantIds","tenants","queryAll","partitionKey","options","index","gt","map","tenant","data","id","exports"],"sources":["tenant.ts"],"sourcesContent":["import type { PrerenderingServiceTenantStorageOperations } from \"@webiny/api-prerendering-service/types\";\nimport type { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { queryAll } from \"@webiny/db-dynamodb/utils/query\";\n\nexport interface CreateTenantStorageOperationsParams {\n entity: Entity<any>;\n}\n\ninterface Tenant {\n data: { id: string };\n}\n\nexport const createTenantStorageOperations = (\n params: CreateTenantStorageOperationsParams\n): PrerenderingServiceTenantStorageOperations => {\n const { entity } = params;\n\n const getTenantIds = async (): Promise<string[]> => {\n const tenants = await queryAll<Tenant>({\n entity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n return tenants.map(tenant => tenant.data.id);\n };\n\n return { getTenantIds };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAUO,MAAMC,6BAA6B,GACtCC,MAA2C,IACE;EAC7C,MAAM;IAAEC;EAAO,CAAC,GAAGD,MAAM;EAEzB,MAAME,YAAY,GAAG,MAAAA,CAAA,KAA+B;IAChD,MAAMC,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAAS;MACnCH,MAAM;MACNI,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,OAAOL,OAAO,CAACM,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACC,IAAI,CAACC,EAAE,CAAC;EAChD,CAAC;EAED,OAAO;IAAEV;EAAa,CAAC;AAC3B,CAAC;AAACW,OAAA,CAAAd,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-prerendering-service-so-ddb",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.fdd9228b5d",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,49 +11,34 @@
|
|
|
11
11
|
"@webiny/api-prerendering-service",
|
|
12
12
|
"storage-operations",
|
|
13
13
|
"dynamodb",
|
|
14
|
+
"ddb",
|
|
14
15
|
"ps:ddb"
|
|
15
16
|
],
|
|
16
17
|
"description": "A DynamoDB storage operations for the Prerendering Service API.",
|
|
17
18
|
"author": "Webiny Ltd",
|
|
18
19
|
"license": "MIT",
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@webiny/
|
|
22
|
-
"@webiny/error": "0.0.0-unstable.
|
|
23
|
-
"dynamodb-toolbox": "0.3.5"
|
|
21
|
+
"@webiny/api-prerendering-service": "0.0.0-unstable.fdd9228b5d",
|
|
22
|
+
"@webiny/aws-sdk": "0.0.0-unstable.fdd9228b5d",
|
|
23
|
+
"@webiny/error": "0.0.0-unstable.fdd9228b5d"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@webiny/handler-aws": "^0.0.0-unstable.fcdad0bc61",
|
|
35
|
-
"@webiny/project-utils": "^0.0.0-unstable.fcdad0bc61",
|
|
36
|
-
"jest-dynalite": "^3.3.1",
|
|
37
|
-
"jest-environment-node": "^27.3.0",
|
|
38
|
-
"prettier": "^2.3.2",
|
|
39
|
-
"rimraf": "^3.0.2",
|
|
40
|
-
"ttypescript": "^1.5.12",
|
|
41
|
-
"typescript": "4.7.4"
|
|
26
|
+
"@webiny/db": "0.0.0-unstable.fdd9228b5d",
|
|
27
|
+
"@webiny/db-dynamodb": "0.0.0-unstable.fdd9228b5d",
|
|
28
|
+
"@webiny/handler-aws": "0.0.0-unstable.fdd9228b5d",
|
|
29
|
+
"@webiny/project-utils": "0.0.0-unstable.fdd9228b5d",
|
|
30
|
+
"jest-dynalite": "3.6.1",
|
|
31
|
+
"prettier": "2.8.8",
|
|
32
|
+
"rimraf": "6.0.1",
|
|
33
|
+
"typescript": "5.3.3"
|
|
42
34
|
},
|
|
43
35
|
"publishConfig": {
|
|
44
36
|
"access": "public",
|
|
45
37
|
"directory": "dist"
|
|
46
38
|
},
|
|
47
39
|
"scripts": {
|
|
48
|
-
"build": "
|
|
49
|
-
"watch": "
|
|
40
|
+
"build": "node ../cli/bin.js run build",
|
|
41
|
+
"watch": "node ../cli/bin.js run watch"
|
|
50
42
|
},
|
|
51
|
-
"
|
|
52
|
-
"ignore": {
|
|
53
|
-
"src": [
|
|
54
|
-
"aws-sdk"
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"gitHead": "40d639c3665e384a5e2d26674d43ce26f3295e8c"
|
|
43
|
+
"gitHead": "fdd9228b5d2636463e8a34b6e0d26eea1e29c01d"
|
|
59
44
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from "@webiny/api-prerendering-service/types";
|
|
6
|
-
export
|
|
7
|
-
export declare type Attributes = Record<string, AttributeDefinition>;
|
|
1
|
+
import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
|
2
|
+
import type { Entity, Table } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
|
4
|
+
import type { AttributeDefinition } from "@webiny/db-dynamodb/toolbox";
|
|
5
|
+
import type { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from "@webiny/api-prerendering-service/types";
|
|
6
|
+
export type Attributes = Record<string, AttributeDefinition>;
|
|
8
7
|
export declare enum ENTITIES {
|
|
9
8
|
RENDER = "PrerenderingServiceRender",
|
|
10
9
|
SETTINGS = "PrerenderingServiceSettings",
|
|
11
10
|
QUEUE_JOB = "PrerenderingServiceQueueJob",
|
|
12
|
-
TAG_PATH_LINK = "PrerenderingServiceTagPathLink"
|
|
11
|
+
TAG_PATH_LINK = "PrerenderingServiceTagPathLink",
|
|
12
|
+
TENANT = "Tenant"
|
|
13
13
|
}
|
|
14
14
|
export interface PrerenderingServiceFactoryParams {
|
|
15
|
-
documentClient:
|
|
15
|
+
documentClient: DynamoDBDocument;
|
|
16
16
|
table?: TableModifier;
|
|
17
17
|
attributes?: Record<ENTITIES, Attributes>;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type Entities = "render" | "queueJob" | "tagPathLink";
|
|
20
20
|
export interface PrerenderingServiceStorageOperations extends BasePrerenderingServiceStorageOperations {
|
|
21
|
-
getTable(): Table
|
|
21
|
+
getTable(): Table<string, string, string>;
|
|
22
22
|
getEntities(): Record<Entities, Entity<any>>;
|
|
23
23
|
}
|
|
24
24
|
export interface PrerenderingServiceFactory {
|
|
25
25
|
(params: PrerenderingServiceFactoryParams): PrerenderingServiceStorageOperations;
|
|
26
26
|
}
|
|
27
27
|
export interface TableModifier {
|
|
28
|
-
(table: TableConstructor): TableConstructor
|
|
28
|
+
(table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;
|
|
29
29
|
}
|
|
30
30
|
export interface DataContainer<T> {
|
|
31
31
|
PK: string;
|
package/types.js
CHANGED
|
@@ -4,12 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ENTITIES = void 0;
|
|
7
|
-
let ENTITIES
|
|
8
|
-
exports.ENTITIES = ENTITIES;
|
|
9
|
-
|
|
10
|
-
(function (ENTITIES) {
|
|
7
|
+
let ENTITIES = exports.ENTITIES = /*#__PURE__*/function (ENTITIES) {
|
|
11
8
|
ENTITIES["RENDER"] = "PrerenderingServiceRender";
|
|
12
9
|
ENTITIES["SETTINGS"] = "PrerenderingServiceSettings";
|
|
13
10
|
ENTITIES["QUEUE_JOB"] = "PrerenderingServiceQueueJob";
|
|
14
11
|
ENTITIES["TAG_PATH_LINK"] = "PrerenderingServiceTagPathLink";
|
|
15
|
-
|
|
12
|
+
ENTITIES["TENANT"] = "Tenant";
|
|
13
|
+
return ENTITIES;
|
|
14
|
+
}({});
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ENTITIES"],"sources":["types.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport type { AttributeDefinition } from \"@webiny/db-dynamodb/toolbox\";\nimport type { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from \"@webiny/api-prerendering-service/types\";\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n RENDER = \"PrerenderingServiceRender\",\n SETTINGS = \"PrerenderingServiceSettings\",\n QUEUE_JOB = \"PrerenderingServiceQueueJob\",\n TAG_PATH_LINK = \"PrerenderingServiceTagPathLink\",\n TENANT = \"Tenant\"\n}\n\nexport interface PrerenderingServiceFactoryParams {\n documentClient: DynamoDBDocument;\n table?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n}\n\nexport type Entities = \"render\" | \"queueJob\" | \"tagPathLink\";\n\nexport interface PrerenderingServiceStorageOperations\n extends BasePrerenderingServiceStorageOperations {\n getTable(): Table<string, string, string>;\n getEntities(): Record<Entities, Entity<any>>;\n}\n\nexport interface PrerenderingServiceFactory {\n (params: PrerenderingServiceFactoryParams): PrerenderingServiceStorageOperations;\n}\n\nexport interface TableModifier {\n (table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;\n}\n\nexport interface DataContainer<T> {\n PK: string;\n SK: string;\n data: T;\n}\n"],"mappings":";;;;;;IAQYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|