@contember/cli 2.0.0-alpha.19 → 2.0.0-alpha.20
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/dist/development/src/commands/transfer/ExportCommand.cjs +2 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ExportCommand.js +2 -0
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.cjs +2 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.js +2 -0
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantClient.cjs +1 -1
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -1
- package/dist/development/src/lib/tenant/TenantClient.js +2 -2
- package/dist/development/src/lib/tenant/TenantClient.js.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +2 -2
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.js +2 -2
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.cjs +2 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.js +2 -0
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.cjs +2 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.js +2 -0
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantClient.cjs +1 -1
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -1
- package/dist/production/src/lib/tenant/TenantClient.js +2 -2
- package/dist/production/src/lib/tenant/TenantClient.js.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +2 -2
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.js +2 -2
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/types/commands/transfer/ExportCommand.d.ts +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/TransferCommand.d.ts +1 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
- package/dist/types/lib/transfer/DataTransferClient.d.ts +2 -1
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/commands/transfer/ExportCommand.ts +3 -0
- package/src/commands/transfer/TransferCommand.ts +3 -0
- package/src/lib/tenant/TenantClient.ts +1 -1
- package/src/lib/transfer/DataTransferClient.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contember": "./dist/production/run.js"
|
|
@@ -11,27 +11,27 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/fs-extra": "^11.0.4",
|
|
13
13
|
"@types/js-yaml": "^4.0.9",
|
|
14
|
-
"@types/node": "^20.16.
|
|
14
|
+
"@types/node": "^20.16.11",
|
|
15
15
|
"@types/prompts": "^2.4.9",
|
|
16
16
|
"@types/semver": "^7.5.8",
|
|
17
17
|
"autoprefixer": "^10.4.20",
|
|
18
|
-
"postcss": "^8.4.
|
|
19
|
-
"tailwindcss": "^3.4.
|
|
18
|
+
"postcss": "^8.4.47",
|
|
19
|
+
"tailwindcss": "^3.4.14"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@contember/cli-common": "2.0.0-alpha.
|
|
23
|
-
"@contember/config-loader": "2.0.0-alpha.
|
|
24
|
-
"@contember/database": "2.0.0-alpha.
|
|
25
|
-
"@contember/dic": "2.0.0-alpha.
|
|
26
|
-
"@contember/engine-common": "2.0.0-alpha.
|
|
27
|
-
"@contember/engine-content-api": "2.0.0-alpha.
|
|
28
|
-
"@contember/graphql-client": "2.0.0-alpha.
|
|
29
|
-
"@contember/migrations-client": "2.0.0-alpha.
|
|
30
|
-
"@contember/schema": "2.0.0-alpha.
|
|
31
|
-
"@contember/schema-migrations": "2.0.0-alpha.
|
|
32
|
-
"@contember/schema-utils": "2.0.0-alpha.
|
|
33
|
-
"@contember/typesafe": "2.0.0-alpha.
|
|
34
|
-
"@graphql-tools/schema": "^10.0.
|
|
22
|
+
"@contember/cli-common": "2.0.0-alpha.20",
|
|
23
|
+
"@contember/config-loader": "2.0.0-alpha.20",
|
|
24
|
+
"@contember/database": "2.0.0-alpha.20",
|
|
25
|
+
"@contember/dic": "2.0.0-alpha.20",
|
|
26
|
+
"@contember/engine-common": "2.0.0-alpha.20",
|
|
27
|
+
"@contember/engine-content-api": "2.0.0-alpha.20",
|
|
28
|
+
"@contember/graphql-client": "2.0.0-alpha.20",
|
|
29
|
+
"@contember/migrations-client": "2.0.0-alpha.20",
|
|
30
|
+
"@contember/schema": "2.0.0-alpha.20",
|
|
31
|
+
"@contember/schema-migrations": "2.0.0-alpha.20",
|
|
32
|
+
"@contember/schema-utils": "2.0.0-alpha.20",
|
|
33
|
+
"@contember/typesafe": "2.0.0-alpha.20",
|
|
34
|
+
"@graphql-tools/schema": "^10.0.7",
|
|
35
35
|
"chalk": "^5.3.0",
|
|
36
36
|
"chalk-table": "^1.0.2",
|
|
37
37
|
"esbuild": "^0.21.5",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"lodash-es": "^4.17.21",
|
|
42
42
|
"pg": "^8.12.0",
|
|
43
43
|
"preact": "^10.23.2",
|
|
44
|
-
"preact-render-to-string": "^6.5.
|
|
44
|
+
"preact-render-to-string": "^6.5.11",
|
|
45
45
|
"prompts": "^2.4.2",
|
|
46
46
|
"semver": "^7.6.3",
|
|
47
47
|
"yawn-yaml": "^2.3.0"
|
|
@@ -17,6 +17,7 @@ type Options = {
|
|
|
17
17
|
'no-gzip-output'?: boolean
|
|
18
18
|
'no-gzip-transfer'?: boolean
|
|
19
19
|
output?: string
|
|
20
|
+
'exclude-table'?: string[]
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export class ExportCommand extends Command<Args, Options> {
|
|
@@ -35,6 +36,7 @@ export class ExportCommand extends Command<Args, Options> {
|
|
|
35
36
|
configuration.option('no-gzip-transfer').valueNone()
|
|
36
37
|
configuration.option('no-gzip-output').valueNone()
|
|
37
38
|
configuration.option('output').valueRequired()
|
|
39
|
+
configuration.option('exclude-table').valueArray()
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
protected async execute(input: Input<Args, Options>): Promise<void | number> {
|
|
@@ -58,6 +60,7 @@ export class ExportCommand extends Command<Args, Options> {
|
|
|
58
60
|
|
|
59
61
|
const response = await this.dataTransferClient.dataExport({
|
|
60
62
|
project,
|
|
63
|
+
excludeTables: input.getOption('exclude-table') ?? [],
|
|
61
64
|
includeSystem,
|
|
62
65
|
gzip: gzipTransfer,
|
|
63
66
|
})
|
|
@@ -15,6 +15,7 @@ type Options = {
|
|
|
15
15
|
'include-system'?: boolean
|
|
16
16
|
'no-gzip-transfer'?: boolean
|
|
17
17
|
yes: boolean
|
|
18
|
+
'exclude-table'?: string[]
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export class TransferCommand extends Command<Args, Options> {
|
|
@@ -32,6 +33,7 @@ export class TransferCommand extends Command<Args, Options> {
|
|
|
32
33
|
configuration.option('include-system').valueNone()
|
|
33
34
|
configuration.option('no-gzip-transfer').valueNone()
|
|
34
35
|
configuration.option('yes').valueNone()
|
|
36
|
+
configuration.option('exclude-table').valueArray()
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
protected async execute(input: Input<Args, Options>): Promise<void | number> {
|
|
@@ -68,6 +70,7 @@ export class TransferCommand extends Command<Args, Options> {
|
|
|
68
70
|
const exportResponse = (await this.dataTransferClient.dataExport({
|
|
69
71
|
project: sourceProject,
|
|
70
72
|
includeSystem,
|
|
73
|
+
excludeTables: input.getOption('exclude-table') ?? [],
|
|
71
74
|
gzip: gzipTransfer,
|
|
72
75
|
}))
|
|
73
76
|
const ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse
|
|
@@ -15,7 +15,7 @@ export class TenantClient {
|
|
|
15
15
|
constructor(private readonly apiClient: GraphQlClient) {}
|
|
16
16
|
|
|
17
17
|
public static create(url: string, apiToken: string): TenantClient {
|
|
18
|
-
const graphqlClient = new GraphQlClient(createTenantApiUrl(url), apiToken)
|
|
18
|
+
const graphqlClient = new GraphQlClient({ url: createTenantApiUrl(url), apiToken })
|
|
19
19
|
return new TenantClient(graphqlClient)
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -60,8 +60,9 @@ export class DataTransferClient {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
dataExport = async ({ project: { name: project, token, endpoint: baseUrl }, gzip, includeSystem }: {
|
|
63
|
+
dataExport = async ({ project: { name: project, token, endpoint: baseUrl }, gzip, includeSystem, excludeTables }: {
|
|
64
64
|
project: RemoteProject
|
|
65
|
+
excludeTables?: string[]
|
|
65
66
|
includeSystem: boolean
|
|
66
67
|
gzip: boolean
|
|
67
68
|
}) => {
|
|
@@ -73,7 +74,7 @@ export class DataTransferClient {
|
|
|
73
74
|
'Content-type': 'application/json',
|
|
74
75
|
},
|
|
75
76
|
body: JSON.stringify({
|
|
76
|
-
projects: [{ slug: project, system: includeSystem }],
|
|
77
|
+
projects: [{ slug: project, system: includeSystem, excludeTables }],
|
|
77
78
|
}),
|
|
78
79
|
})
|
|
79
80
|
}
|