auth0-deploy-cli 7.24.2 → 8.0.0
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/.github/workflows/semgrep.yml +1 -1
- package/.nyc_output/21e10bd2-0a3e-4ba1-bd1d-f10aec1ae717.json +1 -0
- package/.nyc_output/processinfo/21e10bd2-0a3e-4ba1-bd1d-f10aec1ae717.json +1 -0
- package/.nyc_output/processinfo/5682adea-ce69-4464-a15f-6e98b29ca5cf.json +1 -0
- package/.nyc_output/processinfo/cb634365-204c-4c03-9f35-74638d381757.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +30 -1
- package/CONTRIBUTING.md +6 -0
- package/README.md +1 -1
- package/coverage/lcov-report/index.html +69 -69
- package/coverage/lcov.info +3664 -3595
- package/docs/configuring-the-deploy-cli.md +1 -1
- package/docs/excluding-from-management.md +0 -1
- package/docs/resource-specific-documentation.md +11 -8
- package/docs/v8_MIGRATION_GUIDE.md +46 -0
- package/examples/directory/README.md +0 -7
- package/examples/directory/config.json.example +3 -3
- package/examples/yaml/config.json.example +4 -4
- package/examples/yaml/tenant.yaml +0 -21
- package/lib/args.js +1 -2
- package/lib/args.js.map +1 -1
- package/lib/commands/export.js +1 -1
- package/lib/commands/export.js.map +1 -1
- package/lib/commands/import.js +1 -1
- package/lib/commands/import.js.map +1 -1
- package/lib/configFactory.js.map +1 -1
- package/lib/context/defaults.js +1 -2
- package/lib/context/defaults.js.map +1 -1
- package/lib/context/directory/handlers/actions.js +3 -0
- package/lib/context/directory/handlers/actions.js.map +1 -1
- package/lib/context/directory/handlers/attackProtection.js.map +1 -1
- package/lib/context/directory/handlers/branding.js.map +1 -1
- package/lib/context/directory/handlers/clientGrants.js +3 -2
- package/lib/context/directory/handlers/clientGrants.js.map +1 -1
- package/lib/context/directory/handlers/clients.js.map +1 -1
- package/lib/context/directory/handlers/connections.js.map +1 -1
- package/lib/context/directory/handlers/databases.js.map +1 -1
- package/lib/context/directory/handlers/emailProvider.js.map +1 -1
- package/lib/context/directory/handlers/emailTemplates.js.map +1 -1
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -1
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -1
- package/lib/context/directory/handlers/guardianPolicies.js.map +1 -1
- package/lib/context/directory/handlers/hooks.js.map +1 -1
- package/lib/context/directory/handlers/index.js +3 -5
- package/lib/context/directory/handlers/index.js.map +1 -1
- package/lib/context/directory/handlers/organizations.js.map +1 -1
- package/lib/context/directory/handlers/pages.js.map +1 -1
- package/lib/context/directory/handlers/prompts.js +4 -1
- package/lib/context/directory/handlers/prompts.js.map +1 -1
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js.map +1 -1
- package/lib/context/directory/handlers/roles.js.map +1 -1
- package/lib/context/directory/handlers/rules.js.map +1 -1
- package/lib/context/directory/handlers/tenant.js.map +1 -1
- package/lib/context/directory/handlers/themes.js.map +1 -1
- package/lib/context/directory/index.d.ts +2 -1
- package/lib/context/directory/index.js +3 -3
- package/lib/context/directory/index.js.map +1 -1
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.js +8 -3
- package/lib/context/index.js.map +1 -1
- package/lib/context/yaml/handlers/actions.js +4 -1
- package/lib/context/yaml/handlers/actions.js.map +1 -1
- package/lib/context/yaml/handlers/branding.js.map +1 -1
- package/lib/context/yaml/handlers/clientGrants.js +4 -2
- package/lib/context/yaml/handlers/clientGrants.js.map +1 -1
- package/lib/context/yaml/handlers/clients.js.map +1 -1
- package/lib/context/yaml/handlers/connections.js.map +1 -1
- package/lib/context/yaml/handlers/emailProvider.js.map +1 -1
- package/lib/context/yaml/handlers/emailTemplates.js.map +1 -1
- package/lib/context/yaml/handlers/guardianPolicies.d.ts +2 -2
- package/lib/context/yaml/handlers/hooks.js.map +1 -1
- package/lib/context/yaml/handlers/index.js +4 -6
- package/lib/context/yaml/handlers/index.js.map +1 -1
- package/lib/context/yaml/handlers/organizations.js.map +1 -1
- package/lib/context/yaml/handlers/pages.js.map +1 -1
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js.map +1 -1
- package/lib/context/yaml/handlers/roles.js.map +1 -1
- package/lib/context/yaml/handlers/rules.js.map +1 -1
- package/lib/context/yaml/handlers/themes.d.ts +1 -1
- package/lib/context/yaml/index.d.ts +2 -1
- package/lib/context/yaml/index.js +4 -4
- package/lib/context/yaml/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js.map +1 -1
- package/lib/readonly.js +1 -1
- package/lib/readonly.js.map +1 -1
- package/lib/sessionDurationsToMinutes.d.ts +2 -2
- package/lib/tools/auth0/client.d.ts +4 -2
- package/lib/tools/auth0/client.js +14 -4
- package/lib/tools/auth0/client.js.map +1 -1
- package/lib/tools/auth0/handlers/actions.d.ts +8 -3
- package/lib/tools/auth0/handlers/actions.js +19 -17
- package/lib/tools/auth0/handlers/actions.js.map +1 -1
- package/lib/tools/auth0/handlers/attackProtection.js +8 -8
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -1
- package/lib/tools/auth0/handlers/branding.js +25 -12
- package/lib/tools/auth0/handlers/branding.js.map +1 -1
- package/lib/tools/auth0/handlers/clientGrants.js +11 -3
- package/lib/tools/auth0/handlers/clientGrants.js.map +1 -1
- package/lib/tools/auth0/handlers/clients.d.ts +3 -3
- package/lib/tools/auth0/handlers/clients.js +3 -1
- package/lib/tools/auth0/handlers/clients.js.map +1 -1
- package/lib/tools/auth0/handlers/connections.d.ts +8 -1
- package/lib/tools/auth0/handlers/connections.js +18 -8
- package/lib/tools/auth0/handlers/connections.js.map +1 -1
- package/lib/tools/auth0/handlers/customDomains.js +2 -2
- package/lib/tools/auth0/handlers/customDomains.js.map +1 -1
- package/lib/tools/auth0/handlers/databases.d.ts +1 -1
- package/lib/tools/auth0/handlers/databases.js +14 -7
- package/lib/tools/auth0/handlers/databases.js.map +1 -1
- package/lib/tools/auth0/handlers/default.js +14 -4
- package/lib/tools/auth0/handlers/default.js.map +1 -1
- package/lib/tools/auth0/handlers/emailProvider.js +20 -11
- package/lib/tools/auth0/handlers/emailProvider.js.map +1 -1
- package/lib/tools/auth0/handlers/emailTemplates.js +23 -10
- package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +40 -6
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +29 -5
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactors.js +2 -1
- package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.d.ts +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +3 -3
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +3 -3
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPolicies.d.ts +2 -2
- package/lib/tools/auth0/handlers/guardianPolicies.js +2 -3
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -1
- package/lib/tools/auth0/handlers/hooks.js +8 -4
- package/lib/tools/auth0/handlers/hooks.js.map +1 -1
- package/lib/tools/auth0/handlers/index.d.ts +6 -147
- package/lib/tools/auth0/handlers/index.js +0 -3
- package/lib/tools/auth0/handlers/index.js.map +1 -1
- package/lib/tools/auth0/handlers/logStreams.js +1 -1
- package/lib/tools/auth0/handlers/logStreams.js.map +1 -1
- package/lib/tools/auth0/handlers/organizations.js +11 -10
- package/lib/tools/auth0/handlers/organizations.js.map +1 -1
- package/lib/tools/auth0/handlers/pages.js +7 -6
- package/lib/tools/auth0/handlers/pages.js.map +1 -1
- package/lib/tools/auth0/handlers/prompts.d.ts +2 -3
- package/lib/tools/auth0/handlers/prompts.js +43 -70
- package/lib/tools/auth0/handlers/prompts.js.map +1 -1
- package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -9
- package/lib/tools/auth0/handlers/resourceServers.js +2 -1
- package/lib/tools/auth0/handlers/resourceServers.js.map +1 -1
- package/lib/tools/auth0/handlers/roles.js +33 -12
- package/lib/tools/auth0/handlers/roles.js.map +1 -1
- package/lib/tools/auth0/handlers/rules.js +8 -3
- package/lib/tools/auth0/handlers/rules.js.map +1 -1
- package/lib/tools/auth0/handlers/rulesConfigs.js +2 -1
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -1
- package/lib/tools/auth0/handlers/scimHandler.d.ts +10 -11
- package/lib/tools/auth0/handlers/scimHandler.js +57 -46
- package/lib/tools/auth0/handlers/scimHandler.js.map +1 -1
- package/lib/tools/auth0/handlers/tenant.d.ts +5 -9
- package/lib/tools/auth0/handlers/tenant.js +55 -54
- package/lib/tools/auth0/handlers/tenant.js.map +1 -1
- package/lib/tools/auth0/handlers/themes.d.ts +2 -85
- package/lib/tools/auth0/handlers/themes.js +4 -4
- package/lib/tools/auth0/handlers/themes.js.map +1 -1
- package/lib/tools/auth0/handlers/triggers.js +8 -7
- package/lib/tools/auth0/handlers/triggers.js.map +1 -1
- package/lib/tools/auth0/index.d.ts +2 -2
- package/lib/tools/auth0/index.js.map +1 -1
- package/lib/tools/auth0/schema.js.map +1 -1
- package/lib/tools/calculateChanges.js +2 -3
- package/lib/tools/calculateChanges.js.map +1 -1
- package/lib/tools/constants.d.ts +2 -1
- package/lib/tools/constants.js +1 -1
- package/lib/tools/constants.js.map +1 -1
- package/lib/tools/deploy.js +1 -1
- package/lib/tools/deploy.js.map +1 -1
- package/lib/tools/index.d.ts +1 -1
- package/lib/tools/utils.js +16 -16
- package/lib/tools/utils.js.map +1 -1
- package/lib/tools/validationError.js.map +1 -1
- package/lib/types.d.ts +9 -205
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +7 -69
- package/lib/utils.js +18 -19
- package/lib/utils.js.map +1 -1
- package/package.json +17 -13
- package/.nyc_output/6fbd242f-7eed-4196-adf4-fe545cdfb540.json +0 -1
- package/.nyc_output/processinfo/1aa55350-a75f-48f9-bb54-ad1223aae81c.json +0 -1
- package/.nyc_output/processinfo/54aa2604-c08d-4a3c-b33f-07ffb35277e3.json +0 -1
- package/.nyc_output/processinfo/6fbd242f-7eed-4196-adf4-fe545cdfb540.json +0 -1
- package/lib/context/directory/handlers/migrations.d.ts +0 -5
- package/lib/context/directory/handlers/migrations.js +0 -45
- package/lib/context/directory/handlers/migrations.js.map +0 -1
- package/lib/context/yaml/handlers/migrations.d.ts +0 -5
- package/lib/context/yaml/handlers/migrations.js +0 -25
- package/lib/context/yaml/handlers/migrations.js.map +0 -1
- package/lib/tools/auth0/handlers/migrations.d.ts +0 -15
- package/lib/tools/auth0/handlers/migrations.js +0 -110
- package/lib/tools/auth0/handlers/migrations.js.map +0 -1
- /package/.nyc_output/{1aa55350-a75f-48f9-bb54-ad1223aae81c.json → 5682adea-ce69-4464-a15f-6e98b29ca5cf.json} +0 -0
- /package/.nyc_output/{54aa2604-c08d-4a3c-b33f-07ffb35277e3.json → cb634365-204c-4c03-9f35-74638d381757.json} +0 -0
package/lib/types.d.ts
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
+
import { GetConnectionsStrategyEnum, ManagementClient, ResourceServer } from 'auth0';
|
|
1
2
|
import { PromisePoolExecutor } from 'promise-pool-executor';
|
|
2
3
|
import { Action } from './tools/auth0/handlers/actions';
|
|
3
|
-
import {
|
|
4
|
+
import { Prompts } from './tools/auth0/handlers/prompts';
|
|
4
5
|
import { Tenant } from './tools/auth0/handlers/tenant';
|
|
5
|
-
import { Theme } from './tools/auth0/handlers/themes';
|
|
6
6
|
import { Page } from './tools/auth0/handlers/pages';
|
|
7
7
|
import { LogStream } from './tools/auth0/handlers/logStreams';
|
|
8
8
|
import { Client } from './tools/auth0/handlers/clients';
|
|
9
9
|
import { ClientGrant } from './tools/auth0/handlers/clientGrants';
|
|
10
|
-
import {
|
|
10
|
+
import { Theme } from './tools/auth0/handlers/themes';
|
|
11
11
|
type SharedPaginationParams = {
|
|
12
12
|
checkpoint?: boolean;
|
|
13
13
|
paginate?: boolean;
|
|
14
14
|
is_global?: boolean;
|
|
15
15
|
include_totals?: boolean;
|
|
16
16
|
id?: string;
|
|
17
|
-
strategy?:
|
|
17
|
+
strategy?: GetConnectionsStrategyEnum[];
|
|
18
18
|
};
|
|
19
19
|
export type CheckpointPaginationParams = SharedPaginationParams & {
|
|
20
20
|
from: string;
|
|
21
21
|
take: number;
|
|
22
22
|
};
|
|
23
23
|
export type PagePaginationParams = SharedPaginationParams & {
|
|
24
|
-
page
|
|
25
|
-
per_page
|
|
26
|
-
};
|
|
27
|
-
type APIClientBaseFunctions = {
|
|
28
|
-
getAll: (arg0: SharedPaginationParams) => Promise<Asset[]>;
|
|
29
|
-
create: (arg0: {
|
|
30
|
-
id: string;
|
|
31
|
-
}) => Promise<Asset>;
|
|
32
|
-
update: (arg0: {}, arg1: Asset) => Promise<Asset>;
|
|
33
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
24
|
+
page?: number;
|
|
25
|
+
per_page?: number;
|
|
34
26
|
};
|
|
35
27
|
export type ApiResponse = {
|
|
36
28
|
start: number;
|
|
@@ -40,194 +32,7 @@ export type ApiResponse = {
|
|
|
40
32
|
} & {
|
|
41
33
|
[key in AssetTypes]: Asset[];
|
|
42
34
|
};
|
|
43
|
-
export type
|
|
44
|
-
actions: {
|
|
45
|
-
getAll: (arg0: SharedPaginationParams) => Promise<Action[]>;
|
|
46
|
-
create: (arg0: {
|
|
47
|
-
id: string;
|
|
48
|
-
}) => Promise<Action>;
|
|
49
|
-
update: (arg0: {}, arg1: Action) => Promise<Action>;
|
|
50
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
51
|
-
deploy: (arg0: {
|
|
52
|
-
id: string;
|
|
53
|
-
}) => Promise<void>;
|
|
54
|
-
getAllTriggers: () => Promise<{
|
|
55
|
-
triggers: Asset[];
|
|
56
|
-
}>;
|
|
57
|
-
getTriggerBindings: (arg0: {
|
|
58
|
-
trigger_id: string;
|
|
59
|
-
}) => Promise<{
|
|
60
|
-
bindings: Asset[];
|
|
61
|
-
}>;
|
|
62
|
-
updateTriggerBindings: (arg0: {
|
|
63
|
-
trigger_id: string;
|
|
64
|
-
}, arg1: {
|
|
65
|
-
bindings: Object;
|
|
66
|
-
}) => Promise<{
|
|
67
|
-
bindings: Asset[];
|
|
68
|
-
}>;
|
|
69
|
-
};
|
|
70
|
-
attackProtection: APIClientBaseFunctions & {
|
|
71
|
-
getBreachedPasswordDetectionConfig: () => Promise<Asset>;
|
|
72
|
-
getBruteForceConfig: () => Promise<Asset>;
|
|
73
|
-
getSuspiciousIpThrottlingConfig: () => Promise<Asset>;
|
|
74
|
-
updateBreachedPasswordDetectionConfig: ({}: {}, arg1: Asset) => Promise<void>;
|
|
75
|
-
updateSuspiciousIpThrottlingConfig: ({}: {}, arg1: Asset) => Promise<void>;
|
|
76
|
-
updateBruteForceConfig: ({}: {}, arg1: Asset) => Promise<void>;
|
|
77
|
-
};
|
|
78
|
-
branding: APIClientBaseFunctions & {
|
|
79
|
-
getSettings: () => Promise<Asset>;
|
|
80
|
-
getUniversalLoginTemplate: () => Promise<Asset>;
|
|
81
|
-
updateSettings: ({}: {}, Asset: any) => Promise<void>;
|
|
82
|
-
setUniversalLoginTemplate: ({}: {}, Asset: any) => Promise<void>;
|
|
83
|
-
getDefaultTheme: () => Promise<Theme>;
|
|
84
|
-
updateTheme: (arg0: {
|
|
85
|
-
id: string;
|
|
86
|
-
}, arg1: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
|
|
87
|
-
createTheme: (arg0: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
|
|
88
|
-
deleteTheme: (arg0: {
|
|
89
|
-
id: string;
|
|
90
|
-
}) => Promise<void>;
|
|
91
|
-
};
|
|
92
|
-
clients: {
|
|
93
|
-
getAll: (arg0: SharedPaginationParams) => Promise<Client[]>;
|
|
94
|
-
create: (arg0: {
|
|
95
|
-
id: string;
|
|
96
|
-
}) => Promise<Client>;
|
|
97
|
-
update: (arg0: {}, arg1: Partial<Client>) => Promise<Client>;
|
|
98
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
99
|
-
};
|
|
100
|
-
clientGrants: {
|
|
101
|
-
getAll: (arg0: SharedPaginationParams) => Promise<ClientGrant[]>;
|
|
102
|
-
create: (arg0: {
|
|
103
|
-
id: string;
|
|
104
|
-
}) => Promise<ClientGrant>;
|
|
105
|
-
update: (arg0: {}, arg1: Partial<ClientGrant>) => Promise<ClientGrant>;
|
|
106
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
107
|
-
};
|
|
108
|
-
connections: APIClientBaseFunctions & {
|
|
109
|
-
get: (arg0: Asset) => Promise<Asset>;
|
|
110
|
-
getAll: (arg0: PagePaginationParams | CheckpointPaginationParams) => Promise<Asset[]>;
|
|
111
|
-
create: (arg0: Asset) => Promise<Asset>;
|
|
112
|
-
};
|
|
113
|
-
customDomains: APIClientBaseFunctions & {
|
|
114
|
-
getAll: () => Promise<Asset[]>;
|
|
115
|
-
};
|
|
116
|
-
emailProvider: APIClientBaseFunctions & {
|
|
117
|
-
delete: () => Promise<void>;
|
|
118
|
-
get: (arg0: Asset) => Promise<Asset>;
|
|
119
|
-
configure: (arg0: Object, arg1: Object) => Promise<Asset>;
|
|
120
|
-
};
|
|
121
|
-
emailTemplates: APIClientBaseFunctions & {
|
|
122
|
-
get: (arg0: Asset) => Promise<Asset>;
|
|
123
|
-
};
|
|
124
|
-
guardian: APIClientBaseFunctions & {
|
|
125
|
-
getFactorProvider: (arg0: Asset) => Promise<Asset>;
|
|
126
|
-
updateFactorProvider: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
127
|
-
getFactors: () => Promise<Asset[]>;
|
|
128
|
-
updateFactor: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
129
|
-
getPolicies: () => Promise<Asset[]>;
|
|
130
|
-
updatePolicies: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
131
|
-
getFactorTemplates: (arg0: {
|
|
132
|
-
name: string;
|
|
133
|
-
}) => Promise<Asset[]>;
|
|
134
|
-
updateFactorTemplates: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
135
|
-
updatePhoneFactorMessageTypes: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
136
|
-
getPhoneFactorSelectedProvider: () => Promise<Asset[]>;
|
|
137
|
-
getPhoneFactorMessageTypes: () => Promise<Asset[]>;
|
|
138
|
-
updatePhoneFactorSelectedProvider: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
139
|
-
};
|
|
140
|
-
hooks: APIClientBaseFunctions & {
|
|
141
|
-
get: (arg0: {
|
|
142
|
-
id: string;
|
|
143
|
-
}) => Promise<Asset>;
|
|
144
|
-
removeSecrets: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
145
|
-
updateSecrets: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
146
|
-
getSecrets: (arg0: {
|
|
147
|
-
id: string;
|
|
148
|
-
}) => Promise<Promise<Asset[]>>;
|
|
149
|
-
addSecrets: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
150
|
-
};
|
|
151
|
-
logStreams: {
|
|
152
|
-
getAll: (arg0: SharedPaginationParams) => Promise<LogStream[]>;
|
|
153
|
-
create: (arg0: {
|
|
154
|
-
id: string;
|
|
155
|
-
}) => Promise<LogStream>;
|
|
156
|
-
update: (arg0: {}, arg1: Partial<LogStream>) => Promise<LogStream>;
|
|
157
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
158
|
-
};
|
|
159
|
-
migrations: APIClientBaseFunctions & {
|
|
160
|
-
getMigrations: () => Promise<{
|
|
161
|
-
flags: Asset[];
|
|
162
|
-
}>;
|
|
163
|
-
updateMigrations: (arg0: {
|
|
164
|
-
flags: Asset[];
|
|
165
|
-
}) => Promise<void>;
|
|
166
|
-
};
|
|
167
|
-
organizations: APIClientBaseFunctions & {
|
|
168
|
-
updateEnabledConnection: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
169
|
-
addEnabledConnection: (arg0: {}, arg1: Asset) => Promise<void>;
|
|
170
|
-
removeEnabledConnection: (arg0: Asset) => Promise<void>;
|
|
171
|
-
connections: {
|
|
172
|
-
get: (arg0: Asset) => Promise<Asset>;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
prompts: {
|
|
176
|
-
_getRestClient: (arg0: string) => {
|
|
177
|
-
get: (arg0: string) => Promise<Asset>;
|
|
178
|
-
invoke: (arg0: string, arg1: any) => Promise<Asset>;
|
|
179
|
-
};
|
|
180
|
-
updateCustomTextByLanguage: (arg0: {
|
|
181
|
-
prompt: PromptTypes;
|
|
182
|
-
language: Language;
|
|
183
|
-
body: Partial<{
|
|
184
|
-
[key in ScreenTypes]: {
|
|
185
|
-
[key: string]: string;
|
|
186
|
-
};
|
|
187
|
-
}>;
|
|
188
|
-
}) => Promise<void>;
|
|
189
|
-
getCustomTextByLanguage: (arg0: {
|
|
190
|
-
prompt: PromptTypes;
|
|
191
|
-
language: Language;
|
|
192
|
-
}) => Promise<Partial<PromptsCustomText>>;
|
|
193
|
-
getSettings: () => Promise<PromptSettings>;
|
|
194
|
-
updateSettings: (arg0: {}, arg1: Partial<PromptSettings>) => Promise<void>;
|
|
195
|
-
};
|
|
196
|
-
resourceServers: {
|
|
197
|
-
getAll: (arg0: SharedPaginationParams) => Promise<ResourceServer[]>;
|
|
198
|
-
create: (arg0: {
|
|
199
|
-
id: string;
|
|
200
|
-
}) => Promise<ResourceServer>;
|
|
201
|
-
update: (arg0: {}, arg1: Partial<ResourceServer>) => Promise<ResourceServer>;
|
|
202
|
-
delete: (arg0: Asset) => Promise<void>;
|
|
203
|
-
};
|
|
204
|
-
roles: APIClientBaseFunctions & {
|
|
205
|
-
permissions: APIClientBaseFunctions & {
|
|
206
|
-
delete: (arg0: {
|
|
207
|
-
id: string;
|
|
208
|
-
}, arg1: {
|
|
209
|
-
permissions: Asset[];
|
|
210
|
-
}) => Promise<void>;
|
|
211
|
-
create: (arg0: {
|
|
212
|
-
id: string;
|
|
213
|
-
}, arg1: {
|
|
214
|
-
permissions: Asset[];
|
|
215
|
-
}) => Promise<Asset>;
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
rules: APIClientBaseFunctions;
|
|
219
|
-
rulesConfigs: APIClientBaseFunctions & {
|
|
220
|
-
getAll: () => Promise<Asset[]>;
|
|
221
|
-
};
|
|
222
|
-
tenant: APIClientBaseFunctions & {
|
|
223
|
-
getSettings: () => Promise<Tenant>;
|
|
224
|
-
updateSettings: (arg0: Partial<Tenant>) => Promise<Tenant>;
|
|
225
|
-
};
|
|
226
|
-
triggers: APIClientBaseFunctions & {
|
|
227
|
-
getTriggerBindings: () => Promise<Asset>;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
export type Auth0APIClient = BaseAuth0APIClient & {
|
|
35
|
+
export type Auth0APIClient = ManagementClient & {
|
|
231
36
|
pool: PromisePoolExecutor;
|
|
232
37
|
};
|
|
233
38
|
export type Config = {
|
|
@@ -290,11 +95,10 @@ export type Assets = Partial<{
|
|
|
290
95
|
} | null;
|
|
291
96
|
guardianPhoneFactorSelectedProvider: Asset | null;
|
|
292
97
|
guardianPolicies: {
|
|
293
|
-
policies:
|
|
98
|
+
policies: string[];
|
|
294
99
|
} | null;
|
|
295
100
|
hooks: Asset[] | null;
|
|
296
101
|
logStreams: LogStream[] | null;
|
|
297
|
-
migrations: Asset[] | null;
|
|
298
102
|
organizations: Asset[] | null;
|
|
299
103
|
pages: Page[] | null;
|
|
300
104
|
prompts: Prompts | null;
|
|
@@ -316,7 +120,7 @@ export type CalculatedChanges = {
|
|
|
316
120
|
conflicts: Asset[];
|
|
317
121
|
create: Asset[];
|
|
318
122
|
};
|
|
319
|
-
export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | '
|
|
123
|
+
export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | 'guardianPhoneFactorMessageTypes' | 'guardianPhoneFactorSelectedProvider' | 'guardianPolicies' | 'roles' | 'actions' | 'organizations' | 'triggers' | 'attackProtection' | 'branding' | 'logStreams' | 'prompts' | 'customDomains' | 'themes';
|
|
320
124
|
export type KeywordMappings = {
|
|
321
125
|
[key: string]: (string | number)[] | string | number;
|
|
322
126
|
};
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuKa,QAAA,SAAS,GAAG;IACvB,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;CACC,CAAC"}
|
package/lib/utils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function stripIdentifiers(auth0: Auth0, assets: Assets): {
|
|
|
19
19
|
templates?: {
|
|
20
20
|
template: string;
|
|
21
21
|
body: string;
|
|
22
|
-
}[] | null
|
|
22
|
+
}[] | null;
|
|
23
23
|
}) | null | undefined;
|
|
24
24
|
clients?: import("./tools/auth0/handlers/clients").Client[] | null | undefined;
|
|
25
25
|
clientGrants?: import("./tools/auth0/handlers/clientGrants").ClientGrant[] | null | undefined;
|
|
@@ -36,89 +36,27 @@ export declare function stripIdentifiers(auth0: Auth0, assets: Assets): {
|
|
|
36
36
|
} | null | undefined;
|
|
37
37
|
guardianPhoneFactorSelectedProvider?: Asset | null | undefined;
|
|
38
38
|
guardianPolicies?: {
|
|
39
|
-
policies:
|
|
39
|
+
policies: string[];
|
|
40
40
|
} | null | undefined;
|
|
41
41
|
hooks?: Asset[] | null | undefined;
|
|
42
42
|
logStreams?: import("./tools/auth0/handlers/logStreams").LogStream[] | null | undefined;
|
|
43
|
-
migrations?: Asset[] | null | undefined;
|
|
44
43
|
organizations?: Asset[] | null | undefined;
|
|
45
44
|
pages?: import("./tools/auth0/handlers/pages").Page[] | null | undefined;
|
|
46
45
|
prompts?: Partial<import("./tools/auth0/handlers/prompts").PromptSettings & {
|
|
47
|
-
customText:
|
|
48
|
-
|
|
49
|
-
ar: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
50
|
-
bg: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
51
|
-
bs: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
52
|
-
"ca-ES": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
53
|
-
cs: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
54
|
-
cy: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
55
|
-
da: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
56
|
-
de: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
57
|
-
el: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
58
|
-
en: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
59
|
-
es: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
60
|
-
et: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
61
|
-
"eu-ES": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
62
|
-
fi: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
63
|
-
fr: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
64
|
-
"fr-CA": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
65
|
-
"fr-FR": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
66
|
-
"gl-ES": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
67
|
-
he: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
68
|
-
hi: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
69
|
-
hr: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
70
|
-
hu: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
71
|
-
is: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
72
|
-
it: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
73
|
-
ja: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
74
|
-
ko: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
75
|
-
lt: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
76
|
-
lv: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
77
|
-
nb: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
78
|
-
nl: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
79
|
-
nn: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
80
|
-
no: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
81
|
-
pl: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
82
|
-
pt: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
83
|
-
"pt-BR": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
84
|
-
"pt-PT": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
85
|
-
ro: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
86
|
-
ru: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
87
|
-
sk: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
88
|
-
sl: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
89
|
-
sr: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
90
|
-
sv: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
91
|
-
th: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
92
|
-
tr: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
93
|
-
uk: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
94
|
-
vi: Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
95
|
-
"zh-CN": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
96
|
-
"zh-TW": Partial<import("./tools/auth0/handlers/prompts").PromptsCustomText>;
|
|
97
|
-
}>;
|
|
98
|
-
partials: Partial<{
|
|
99
|
-
[x: string]: Partial<{
|
|
100
|
-
[x: string]: Partial<{
|
|
101
|
-
"form-content-start": string;
|
|
102
|
-
"form-content-end": string;
|
|
103
|
-
"form-footer-start": string;
|
|
104
|
-
"form-footer-end": string;
|
|
105
|
-
"secondary-actions-start": string;
|
|
106
|
-
"secondary-actions-end": string;
|
|
107
|
-
}>;
|
|
108
|
-
}>;
|
|
109
|
-
}>;
|
|
46
|
+
customText: import("./tools/auth0/handlers/prompts").AllPromptsByLanguage;
|
|
47
|
+
partials: import("./tools/auth0/handlers/prompts").CustomPromptPartials;
|
|
110
48
|
}> | null | undefined;
|
|
111
|
-
resourceServers?: import("
|
|
49
|
+
resourceServers?: import("auth0").ResourceServer[] | null | undefined;
|
|
112
50
|
roles?: Asset[] | null | undefined;
|
|
113
51
|
rules?: Asset[] | null | undefined;
|
|
114
52
|
rulesConfigs?: Asset[] | null | undefined;
|
|
115
|
-
tenant?: import("
|
|
53
|
+
tenant?: import("auth0").TenantSettings | null | undefined;
|
|
116
54
|
triggers?: Asset[] | null | undefined;
|
|
117
55
|
exclude?: {
|
|
118
56
|
[key: string]: string[];
|
|
119
57
|
} | undefined;
|
|
120
58
|
clientsOrig?: Asset[] | null | undefined;
|
|
121
|
-
themes?: import("
|
|
59
|
+
themes?: import("auth0").PostBrandingTheme200Response[] | null | undefined;
|
|
122
60
|
};
|
|
123
61
|
export declare function sanitize(str: string): string;
|
|
124
62
|
type ImportantFields = {
|
package/lib/utils.js
CHANGED
|
@@ -3,7 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.isDirectory = isDirectory;
|
|
7
|
+
exports.isFile = isFile;
|
|
8
|
+
exports.getFiles = getFiles;
|
|
9
|
+
exports.loadJSON = loadJSON;
|
|
10
|
+
exports.dumpJSON = dumpJSON;
|
|
11
|
+
exports.existsMustBeDir = existsMustBeDir;
|
|
12
|
+
exports.toConfigFn = toConfigFn;
|
|
13
|
+
exports.stripIdentifiers = stripIdentifiers;
|
|
14
|
+
exports.sanitize = sanitize;
|
|
15
|
+
exports.formatResults = formatResults;
|
|
16
|
+
exports.recordsSorter = recordsSorter;
|
|
17
|
+
exports.clearTenantFlags = clearTenantFlags;
|
|
18
|
+
exports.ensureProp = ensureProp;
|
|
19
|
+
exports.clearClientArrays = clearClientArrays;
|
|
20
|
+
exports.convertClientIdToName = convertClientIdToName;
|
|
21
|
+
exports.mapClientID2NameSorted = mapClientID2NameSorted;
|
|
22
|
+
exports.nomalizedYAMLPath = nomalizedYAMLPath;
|
|
7
23
|
const path_1 = __importDefault(require("path"));
|
|
8
24
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
25
|
const sanitize_filename_1 = __importDefault(require("sanitize-filename"));
|
|
@@ -18,7 +34,6 @@ function isDirectory(filePath) {
|
|
|
18
34
|
return false;
|
|
19
35
|
}
|
|
20
36
|
}
|
|
21
|
-
exports.isDirectory = isDirectory;
|
|
22
37
|
function isFile(filePath) {
|
|
23
38
|
try {
|
|
24
39
|
return fs_extra_1.default.statSync(path_1.default.resolve(filePath)).isFile();
|
|
@@ -27,7 +42,6 @@ function isFile(filePath) {
|
|
|
27
42
|
return false;
|
|
28
43
|
}
|
|
29
44
|
}
|
|
30
|
-
exports.isFile = isFile;
|
|
31
45
|
function getFiles(folder, exts) {
|
|
32
46
|
if (isDirectory(folder)) {
|
|
33
47
|
return fs_extra_1.default
|
|
@@ -37,7 +51,6 @@ function getFiles(folder, exts) {
|
|
|
37
51
|
}
|
|
38
52
|
return [];
|
|
39
53
|
}
|
|
40
|
-
exports.getFiles = getFiles;
|
|
41
54
|
function loadJSON(file, opts = {
|
|
42
55
|
disableKeywordReplacement: false,
|
|
43
56
|
mappings: {},
|
|
@@ -53,7 +66,6 @@ function loadJSON(file, opts = {
|
|
|
53
66
|
throw new Error(`Error parsing JSON from metadata file: ${file}, because: ${e.message}`);
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
|
-
exports.loadJSON = loadJSON;
|
|
57
69
|
function dumpJSON(file, mappings) {
|
|
58
70
|
try {
|
|
59
71
|
logger_1.default.info(`Writing ${file}`);
|
|
@@ -64,7 +76,6 @@ function dumpJSON(file, mappings) {
|
|
|
64
76
|
throw new Error(`Error writing JSON to metadata file: ${file}, because: ${e.message}`);
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
|
-
exports.dumpJSON = dumpJSON;
|
|
68
79
|
function existsMustBeDir(folder) {
|
|
69
80
|
if (fs_extra_1.default.existsSync(folder)) {
|
|
70
81
|
if (!isDirectory(folder)) {
|
|
@@ -74,11 +85,9 @@ function existsMustBeDir(folder) {
|
|
|
74
85
|
}
|
|
75
86
|
return false;
|
|
76
87
|
}
|
|
77
|
-
exports.existsMustBeDir = existsMustBeDir;
|
|
78
88
|
function toConfigFn(data) {
|
|
79
89
|
return (key) => data[key];
|
|
80
90
|
}
|
|
81
|
-
exports.toConfigFn = toConfigFn;
|
|
82
91
|
function stripIdentifiers(auth0, assets) {
|
|
83
92
|
const updated = Object.assign({}, assets);
|
|
84
93
|
// Some of the object identifiers are required to perform updates.
|
|
@@ -107,11 +116,9 @@ function stripIdentifiers(auth0, assets) {
|
|
|
107
116
|
});
|
|
108
117
|
return updated;
|
|
109
118
|
}
|
|
110
|
-
exports.stripIdentifiers = stripIdentifiers;
|
|
111
119
|
function sanitize(str) {
|
|
112
120
|
return (0, sanitize_filename_1.default)(str, { replacement: '-' });
|
|
113
121
|
}
|
|
114
|
-
exports.sanitize = sanitize;
|
|
115
122
|
function formatResults(item) {
|
|
116
123
|
if (!item || typeof item !== 'object') {
|
|
117
124
|
return item;
|
|
@@ -139,7 +146,6 @@ function formatResults(item) {
|
|
|
139
146
|
});
|
|
140
147
|
return result;
|
|
141
148
|
}
|
|
142
|
-
exports.formatResults = formatResults;
|
|
143
149
|
function recordsSorter(a, b) {
|
|
144
150
|
const importantFields = ['name', 'key', 'client_id', 'template'];
|
|
145
151
|
for (let i = 0; i < importantFields.length; i += 1) {
|
|
@@ -150,20 +156,17 @@ function recordsSorter(a, b) {
|
|
|
150
156
|
}
|
|
151
157
|
return 0;
|
|
152
158
|
}
|
|
153
|
-
exports.recordsSorter = recordsSorter;
|
|
154
159
|
function clearTenantFlags(tenant) {
|
|
155
160
|
if (tenant.flags && !Object.keys(tenant.flags).length) {
|
|
156
161
|
delete tenant.flags;
|
|
157
162
|
}
|
|
158
163
|
}
|
|
159
|
-
exports.clearTenantFlags = clearTenantFlags;
|
|
160
164
|
function ensureProp(obj, props) {
|
|
161
165
|
const value = '';
|
|
162
166
|
if (!dot_prop_1.default.has(obj, props)) {
|
|
163
167
|
dot_prop_1.default.set(obj, props, value);
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
|
-
exports.ensureProp = ensureProp;
|
|
167
170
|
function clearClientArrays(client) {
|
|
168
171
|
const propsToClear = ['allowed_clients', 'allowed_logout_urls', 'allowed_origins', 'callbacks'];
|
|
169
172
|
//If designated properties are null, set them as empty arrays instead
|
|
@@ -175,7 +178,6 @@ function clearClientArrays(client) {
|
|
|
175
178
|
});
|
|
176
179
|
return client;
|
|
177
180
|
}
|
|
178
|
-
exports.clearClientArrays = clearClientArrays;
|
|
179
181
|
function convertClientIdToName(clientId, knownClients = []) {
|
|
180
182
|
try {
|
|
181
183
|
const found = knownClients.find((c) => c.client_id === clientId);
|
|
@@ -185,13 +187,11 @@ function convertClientIdToName(clientId, knownClients = []) {
|
|
|
185
187
|
return clientId;
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
|
-
exports.convertClientIdToName = convertClientIdToName;
|
|
189
190
|
function mapClientID2NameSorted(enabledClients, knownClients) {
|
|
190
191
|
return [
|
|
191
192
|
...(enabledClients || []).map((clientId) => convertClientIdToName(clientId, knownClients)),
|
|
192
193
|
].sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
|
|
193
194
|
}
|
|
194
|
-
exports.mapClientID2NameSorted = mapClientID2NameSorted;
|
|
195
195
|
function nomalizedYAMLPath(filePath) {
|
|
196
196
|
// Trim any leading or trailing whitespace
|
|
197
197
|
filePath = filePath.trim();
|
|
@@ -204,12 +204,11 @@ function nomalizedYAMLPath(filePath) {
|
|
|
204
204
|
// Split the path using the forward slash as the separator
|
|
205
205
|
let pathSplit = normalizedPath.split('/');
|
|
206
206
|
// Remove empty components resulting from leading or redundant slashes
|
|
207
|
-
pathSplit = pathSplit.filter(component => component !== '');
|
|
207
|
+
pathSplit = pathSplit.filter((component) => component !== '');
|
|
208
208
|
// Remove the first '.' if it's the first component
|
|
209
209
|
if (pathSplit.length > 0 && pathSplit[0] === '.') {
|
|
210
210
|
pathSplit.shift();
|
|
211
211
|
}
|
|
212
212
|
return pathSplit;
|
|
213
213
|
}
|
|
214
|
-
exports.nomalizedYAMLPath = nomalizedYAMLPath;
|
|
215
214
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;AAQA,kCAMC;AAED,wBAMC;AAED,4BAQC;AAED,4BAgBC;AAED,4BAQC;AAED,0CAQC;AAED,gCAEC;AAED,4CA6BC;AAED,4BAEC;AAcD,sCA4BC;AAED,sCAYC;AAED,4CAIC;AAED,gCAKC;AAED,8CAWC;AAED,sDAOC;AAED,wDAIC;AAED,8CAwBC;AAxOD,gDAAwB;AACxB,wDAA0B;AAC1B,0EAA6C;AAC7C,wDAA+B;AAC/B,mCAA4D;AAC5D,sDA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,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;KAC3F,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,0CAA0C;IAC1C,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAE3B,0BAA0B;IAC1B,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,mEAAmE;IACnE,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAEpD,0DAA0D;IAC1D,IAAI,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1C,sEAAsE;IACtE,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC;IAE9D,mDAAmD;IACnD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACjD,SAAS,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "A command line tool for deploying updates to your Auth0 tenant",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,35 +33,36 @@
|
|
|
33
33
|
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ajv": "^6.12.6",
|
|
36
|
-
"auth0": "^
|
|
36
|
+
"auth0": "^4.10.0",
|
|
37
37
|
"dot-prop": "^5.2.0",
|
|
38
38
|
"fs-extra": "^10.1.0",
|
|
39
39
|
"global-agent": "^2.1.12",
|
|
40
40
|
"js-yaml": "^4.1.0",
|
|
41
|
-
"lodash": "^4.17.
|
|
41
|
+
"lodash": "^4.17.21",
|
|
42
42
|
"mkdirp": "^1.0.4",
|
|
43
|
-
"nconf": "^0.12.
|
|
43
|
+
"nconf": "^0.12.1",
|
|
44
44
|
"promise-pool-executor": "^1.1.1",
|
|
45
|
-
"sanitize-filename": "^1.6.
|
|
46
|
-
"winston": "^3.
|
|
45
|
+
"sanitize-filename": "^1.6.3",
|
|
46
|
+
"winston": "^3.15.0",
|
|
47
47
|
"yargs": "^15.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "^9.0.13",
|
|
51
|
-
"@types/lodash": "^4.
|
|
52
|
-
"@types/mocha": "^10.0.
|
|
53
|
-
"@types/nconf": "^0.10.
|
|
51
|
+
"@types/lodash": "^4.17.7",
|
|
52
|
+
"@types/mocha": "^10.0.9",
|
|
53
|
+
"@types/nconf": "^0.10.7",
|
|
54
54
|
"@typescript-eslint/parser": "^5.30.3",
|
|
55
55
|
"chai": "^4.3.7",
|
|
56
56
|
"chai-as-promised": "^7.1.1",
|
|
57
57
|
"eslint": "^7.28.0",
|
|
58
58
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
59
59
|
"eslint-config-prettier": "^8.5.0",
|
|
60
|
-
"eslint-plugin-import": "^2.
|
|
60
|
+
"eslint-plugin-import": "^2.30.0",
|
|
61
61
|
"husky": "^7.0.4",
|
|
62
62
|
"kacl": "^1.1.1",
|
|
63
|
-
"mocha": "^10.
|
|
64
|
-
"nock": "^13.
|
|
63
|
+
"mocha": "^10.7.3",
|
|
64
|
+
"nock": "^13.5.5",
|
|
65
|
+
"node-fetch": "^2.7.0",
|
|
65
66
|
"nyc": "^15.0.1",
|
|
66
67
|
"prettier": "^2.6.2",
|
|
67
68
|
"pretty-quick": "^3.1.3",
|
|
@@ -70,9 +71,12 @@
|
|
|
70
71
|
"sinon": "^13.0.2",
|
|
71
72
|
"sinon-chai": "^3.7.0",
|
|
72
73
|
"ts-mocha": "^10.0.0",
|
|
73
|
-
"typescript": "^
|
|
74
|
+
"typescript": "^5.6.3",
|
|
74
75
|
"zlib": "^1.0.5"
|
|
75
76
|
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">= 18"
|
|
79
|
+
},
|
|
76
80
|
"overrides": {
|
|
77
81
|
"istanbul-reports": "3.1.4"
|
|
78
82
|
}
|