@stackframe/stack-shared 2.8.10 → 2.8.12
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/CHANGELOG.md +12 -0
- package/dist/config/{schema.d.cts → schema.d.mts} +38 -33
- package/dist/config/schema.d.ts +37 -32
- package/dist/config/schema.js +5 -3
- package/dist/config/schema.js.map +1 -1
- package/dist/{crud.d.cts → crud.d.mts} +1 -1
- package/dist/esm/config/schema.js +5 -3
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/interface/clientInterface.js +8 -6
- package/dist/esm/interface/clientInterface.js.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.js +20 -15
- package/dist/esm/interface/crud/project-api-keys.js.map +1 -1
- package/dist/esm/interface/crud/projects.js +5 -12
- package/dist/esm/interface/crud/projects.js.map +1 -1
- package/dist/esm/interface/serverInterface.js +28 -2
- package/dist/esm/interface/serverInterface.js.map +1 -1
- package/dist/esm/known-errors.js +43 -1
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.js +2 -0
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/utils/errors.js +4 -0
- package/dist/esm/utils/errors.js.map +1 -1
- package/dist/esm/utils/hashes.js +1 -1
- package/dist/esm/utils/hashes.js.map +1 -1
- package/dist/esm/utils/objects.js +24 -0
- package/dist/esm/utils/objects.js.map +1 -1
- package/dist/esm/utils/promises.js +1 -1
- package/dist/esm/utils/promises.js.map +1 -1
- package/dist/esm/utils/strings.js +1 -0
- package/dist/esm/utils/strings.js.map +1 -1
- package/dist/helpers/password.d.mts +11 -0
- package/dist/helpers/{production-mode.d.cts → production-mode.d.mts} +3 -3
- package/dist/hooks/use-async-callback.js +1 -1
- package/dist/hooks/{use-async-external-store.d.cts → use-async-external-store.d.mts} +1 -1
- package/dist/index.d.mts +30 -0
- package/dist/interface/{adminInterface.d.cts → adminInterface.d.mts} +26 -26
- package/dist/interface/{clientInterface.d.cts → clientInterface.d.mts} +18 -18
- package/dist/interface/clientInterface.js +8 -6
- package/dist/interface/clientInterface.js.map +1 -1
- package/dist/interface/crud/{contact-channels.d.cts → contact-channels.d.mts} +2 -2
- package/dist/interface/crud/{current-user.d.cts → current-user.d.mts} +2 -2
- package/dist/interface/crud/{email-templates.d.cts → email-templates.d.mts} +2 -2
- package/dist/interface/crud/{emails.d.cts → emails.d.mts} +2 -2
- package/dist/interface/crud/emails.js +1 -1
- package/dist/interface/crud/{internal-api-keys.d.cts → internal-api-keys.d.mts} +2 -2
- package/dist/interface/crud/{oauth.d.cts → oauth.d.mts} +2 -2
- package/dist/interface/crud/{project-api-keys.d.cts → project-api-keys.d.mts} +14 -4
- package/dist/interface/crud/project-api-keys.d.ts +12 -2
- package/dist/interface/crud/project-api-keys.js +20 -15
- package/dist/interface/crud/project-api-keys.js.map +1 -1
- package/dist/interface/crud/{project-permissions.d.cts → project-permissions.d.mts} +2 -2
- package/dist/interface/crud/project-permissions.js +1 -1
- package/dist/interface/crud/{projects.d.cts → projects.d.mts} +9 -22
- package/dist/interface/crud/projects.d.ts +7 -20
- package/dist/interface/crud/projects.js +6 -13
- package/dist/interface/crud/projects.js.map +1 -1
- package/dist/interface/crud/{sessions.d.cts → sessions.d.mts} +2 -2
- package/dist/interface/crud/{svix-token.d.cts → svix-token.d.mts} +2 -2
- package/dist/interface/crud/{team-invitation-details.d.cts → team-invitation-details.d.mts} +2 -2
- package/dist/interface/crud/team-invitation-details.js +1 -1
- package/dist/interface/crud/{team-invitation.d.cts → team-invitation.d.mts} +2 -2
- package/dist/interface/crud/team-invitation.js +1 -1
- package/dist/interface/crud/{team-member-profiles.d.cts → team-member-profiles.d.mts} +2 -2
- package/dist/interface/crud/team-member-profiles.js +1 -1
- package/dist/interface/crud/{team-memberships.d.cts → team-memberships.d.mts} +2 -2
- package/dist/interface/crud/{team-permissions.d.cts → team-permissions.d.mts} +2 -2
- package/dist/interface/crud/team-permissions.js +1 -1
- package/dist/interface/crud/{teams.d.cts → teams.d.mts} +2 -2
- package/dist/interface/crud/teams.js +1 -1
- package/dist/interface/crud/{users.d.cts → users.d.mts} +2 -2
- package/dist/interface/crud/users.js +1 -1
- package/dist/interface/{serverInterface.d.cts → serverInterface.d.mts} +23 -21
- package/dist/interface/serverInterface.d.ts +2 -0
- package/dist/interface/serverInterface.js +28 -2
- package/dist/interface/serverInterface.js.map +1 -1
- package/dist/{known-errors.d.cts → known-errors.d.mts} +14 -3
- package/dist/known-errors.d.ts +11 -0
- package/dist/known-errors.js +43 -1
- package/dist/known-errors.js.map +1 -1
- package/dist/{schema-fields.d.cts → schema-fields.d.mts} +2 -1
- package/dist/schema-fields.d.ts +2 -1
- package/dist/schema-fields.js +4 -1
- package/dist/schema-fields.js.map +1 -1
- package/dist/sessions.js +1 -1
- package/dist/utils/api-keys.js +1 -1
- package/dist/utils/{caches.d.cts → caches.d.mts} +2 -2
- package/dist/utils/{errors.d.cts → errors.d.mts} +4 -2
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/errors.js +4 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/fs.js +2 -2
- package/dist/utils/hashes.js +6 -6
- package/dist/utils/hashes.js.map +1 -1
- package/dist/utils/ips.js +1 -1
- package/dist/utils/{json.d.cts → json.d.mts} +1 -1
- package/dist/utils/jwt.js +3 -3
- package/dist/utils/{objects.d.cts → objects.d.mts} +9 -5
- package/dist/utils/objects.d.ts +9 -5
- package/dist/utils/objects.js +28 -0
- package/dist/utils/objects.js.map +1 -1
- package/dist/utils/{promises.d.cts → promises.d.mts} +1 -1
- package/dist/utils/promises.js +1 -1
- package/dist/utils/promises.js.map +1 -1
- package/dist/utils/react.js +1 -1
- package/dist/utils/{stores.d.cts → stores.d.mts} +3 -3
- package/dist/utils/strings.js +1 -0
- package/dist/utils/strings.js.map +1 -1
- package/package.json +9 -6
- package/dist/helpers/password.d.cts +0 -11
- package/dist/index.d.cts +0 -30
- /package/dist/config/{format.d.cts → format.d.mts} +0 -0
- /package/dist/{global.d.d.cts → global.d.d.mts} +0 -0
- /package/dist/hooks/{use-async-callback.d.cts → use-async-callback.d.mts} +0 -0
- /package/dist/hooks/{use-hash.d.cts → use-hash.d.mts} +0 -0
- /package/dist/hooks/{use-strict-memo.d.cts → use-strict-memo.d.mts} +0 -0
- /package/dist/interface/{webhooks.d.cts → webhooks.d.mts} +0 -0
- /package/dist/{sessions.d.cts → sessions.d.mts} +0 -0
- /package/dist/utils/{api-keys.d.cts → api-keys.d.mts} +0 -0
- /package/dist/utils/{arrays.d.cts → arrays.d.mts} +0 -0
- /package/dist/utils/{base64.d.cts → base64.d.mts} +0 -0
- /package/dist/utils/{booleans.d.cts → booleans.d.mts} +0 -0
- /package/dist/utils/{browser-compat.d.cts → browser-compat.d.mts} +0 -0
- /package/dist/utils/{bytes.d.cts → bytes.d.mts} +0 -0
- /package/dist/utils/{compile-time.d.cts → compile-time.d.mts} +0 -0
- /package/dist/utils/{crypto.d.cts → crypto.d.mts} +0 -0
- /package/dist/utils/{dates.d.cts → dates.d.mts} +0 -0
- /package/dist/utils/{dom.d.cts → dom.d.mts} +0 -0
- /package/dist/utils/{env.d.cts → env.d.mts} +0 -0
- /package/dist/utils/{fs.d.cts → fs.d.mts} +0 -0
- /package/dist/utils/{functions.d.cts → functions.d.mts} +0 -0
- /package/dist/utils/{geo.d.cts → geo.d.mts} +0 -0
- /package/dist/utils/{globals.d.cts → globals.d.mts} +0 -0
- /package/dist/utils/{hashes.d.cts → hashes.d.mts} +0 -0
- /package/dist/utils/{html.d.cts → html.d.mts} +0 -0
- /package/dist/utils/{http.d.cts → http.d.mts} +0 -0
- /package/dist/utils/{ips.d.cts → ips.d.mts} +0 -0
- /package/dist/utils/{jwt.d.cts → jwt.d.mts} +0 -0
- /package/dist/utils/{locks.d.cts → locks.d.mts} +0 -0
- /package/dist/utils/{maps.d.cts → maps.d.mts} +0 -0
- /package/dist/utils/{math.d.cts → math.d.mts} +0 -0
- /package/dist/utils/{node-http.d.cts → node-http.d.mts} +0 -0
- /package/dist/utils/{numbers.d.cts → numbers.d.mts} +0 -0
- /package/dist/utils/{oauth.d.cts → oauth.d.mts} +0 -0
- /package/dist/utils/{passkey.d.cts → passkey.d.mts} +0 -0
- /package/dist/utils/{proxies.d.cts → proxies.d.mts} +0 -0
- /package/dist/utils/{react.d.cts → react.d.mts} +0 -0
- /package/dist/utils/{results.d.cts → results.d.mts} +0 -0
- /package/dist/utils/{sentry.d.cts → sentry.d.mts} +0 -0
- /package/dist/utils/{strings.d.cts → strings.d.mts} +0 -0
- /package/dist/utils/{strings.nicify.test.d.cts → strings.nicify.test.d.mts} +0 -0
- /package/dist/utils/{types.d.cts → types.d.mts} +0 -0
- /package/dist/utils/{unicode.d.cts → unicode.d.mts} +0 -0
- /package/dist/utils/{urls.d.cts → urls.d.mts} +0 -0
- /package/dist/utils/{uuids.d.cts → uuids.d.mts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { DeepMerge } from '../utils/objects.
|
|
3
|
-
import { PrettifyType } from '../utils/types.
|
|
4
|
-
import { NormalizesTo } from './format.
|
|
2
|
+
import { DeepMerge, DeepPartial } from '../utils/objects.mjs';
|
|
3
|
+
import { PrettifyType } from '../utils/types.mjs';
|
|
4
|
+
import { NormalizesTo, Config } from './format.mjs';
|
|
5
5
|
|
|
6
6
|
declare const configLevels: readonly ["project", "branch", "environment", "organization"];
|
|
7
7
|
type ConfigLevel = typeof configLevels[number];
|
|
@@ -31,18 +31,18 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
31
31
|
} | undefined;
|
|
32
32
|
apiKeys: {
|
|
33
33
|
enabled?: {
|
|
34
|
-
user?: boolean | undefined;
|
|
35
34
|
team?: boolean | undefined;
|
|
35
|
+
user?: boolean | undefined;
|
|
36
36
|
} | undefined;
|
|
37
37
|
} | undefined;
|
|
38
38
|
domains: {
|
|
39
39
|
allowLocalhost?: boolean | undefined;
|
|
40
40
|
} | undefined;
|
|
41
41
|
auth: {
|
|
42
|
+
allowSignUp?: boolean | undefined;
|
|
42
43
|
password?: {
|
|
43
44
|
allowSignIn?: boolean | undefined;
|
|
44
45
|
} | undefined;
|
|
45
|
-
allowSignUp?: boolean | undefined;
|
|
46
46
|
otp?: {
|
|
47
47
|
allowSignIn?: boolean | undefined;
|
|
48
48
|
} | undefined;
|
|
@@ -52,8 +52,8 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
52
52
|
oauth?: {
|
|
53
53
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
54
54
|
providers?: Record<string, {
|
|
55
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
56
55
|
allowSignIn?: boolean | undefined;
|
|
56
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
57
57
|
allowConnectedAccounts?: boolean | undefined;
|
|
58
58
|
}> | undefined;
|
|
59
59
|
} | undefined;
|
|
@@ -124,8 +124,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
124
124
|
} | undefined;
|
|
125
125
|
apiKeys: {
|
|
126
126
|
enabled?: {
|
|
127
|
-
user?: boolean | undefined;
|
|
128
127
|
team?: boolean | undefined;
|
|
128
|
+
user?: boolean | undefined;
|
|
129
129
|
} | undefined;
|
|
130
130
|
} | undefined;
|
|
131
131
|
domains: (Omit<{
|
|
@@ -137,10 +137,10 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
137
137
|
}> | undefined;
|
|
138
138
|
}) | undefined;
|
|
139
139
|
auth: (Omit<{
|
|
140
|
+
allowSignUp?: boolean | undefined;
|
|
140
141
|
password?: {
|
|
141
142
|
allowSignIn?: boolean | undefined;
|
|
142
143
|
} | undefined;
|
|
143
|
-
allowSignUp?: boolean | undefined;
|
|
144
144
|
otp?: {
|
|
145
145
|
allowSignIn?: boolean | undefined;
|
|
146
146
|
} | undefined;
|
|
@@ -150,8 +150,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
150
150
|
oauth?: {
|
|
151
151
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
152
152
|
providers?: Record<string, {
|
|
153
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
154
153
|
allowSignIn?: boolean | undefined;
|
|
154
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
155
155
|
allowConnectedAccounts?: boolean | undefined;
|
|
156
156
|
}> | undefined;
|
|
157
157
|
} | undefined;
|
|
@@ -159,18 +159,18 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
159
159
|
oauth?: (Omit<{
|
|
160
160
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
161
161
|
providers?: Record<string, {
|
|
162
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
163
162
|
allowSignIn?: boolean | undefined;
|
|
163
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
164
164
|
allowConnectedAccounts?: boolean | undefined;
|
|
165
165
|
}> | undefined;
|
|
166
166
|
}, never> & {
|
|
167
167
|
providers?: Record<string, {
|
|
168
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
169
|
-
clientId?: string | undefined;
|
|
170
|
-
clientSecret?: string | undefined;
|
|
171
168
|
allowSignIn?: boolean | undefined;
|
|
169
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
172
170
|
allowConnectedAccounts?: boolean | undefined;
|
|
173
171
|
isShared?: boolean | undefined;
|
|
172
|
+
clientId?: string | undefined;
|
|
173
|
+
clientSecret?: string | undefined;
|
|
174
174
|
facebookConfigId?: string | undefined;
|
|
175
175
|
microsoftTenantId?: string | undefined;
|
|
176
176
|
}> | undefined;
|
|
@@ -178,21 +178,21 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
178
178
|
}) | undefined;
|
|
179
179
|
emails: Omit<{}, never> & {
|
|
180
180
|
server: {
|
|
181
|
+
password?: string | undefined;
|
|
182
|
+
isShared?: boolean | undefined;
|
|
181
183
|
host?: string | undefined;
|
|
182
184
|
port?: number | undefined;
|
|
183
185
|
username?: string | undefined;
|
|
184
|
-
password?: string | undefined;
|
|
185
|
-
isShared?: boolean | undefined;
|
|
186
186
|
senderName?: string | undefined;
|
|
187
187
|
senderEmail?: string | undefined;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
} & {
|
|
191
191
|
auth: (Omit<{
|
|
192
|
+
allowSignUp?: boolean | undefined;
|
|
192
193
|
password?: {
|
|
193
194
|
allowSignIn?: boolean | undefined;
|
|
194
195
|
} | undefined;
|
|
195
|
-
allowSignUp?: boolean | undefined;
|
|
196
196
|
otp?: {
|
|
197
197
|
allowSignIn?: boolean | undefined;
|
|
198
198
|
} | undefined;
|
|
@@ -202,8 +202,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
202
202
|
oauth?: {
|
|
203
203
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
204
204
|
providers?: Record<string, {
|
|
205
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
206
205
|
allowSignIn?: boolean | undefined;
|
|
206
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
207
207
|
allowConnectedAccounts?: boolean | undefined;
|
|
208
208
|
}> | undefined;
|
|
209
209
|
} | undefined;
|
|
@@ -211,18 +211,18 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
211
211
|
oauth?: (Omit<{
|
|
212
212
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
213
213
|
providers?: Record<string, {
|
|
214
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
215
214
|
allowSignIn?: boolean | undefined;
|
|
215
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
216
216
|
allowConnectedAccounts?: boolean | undefined;
|
|
217
217
|
}> | undefined;
|
|
218
218
|
}, never> & {
|
|
219
219
|
providers?: Record<string, {
|
|
220
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
221
|
-
clientId?: string | undefined;
|
|
222
|
-
clientSecret?: string | undefined;
|
|
223
220
|
allowSignIn?: boolean | undefined;
|
|
221
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
224
222
|
allowConnectedAccounts?: boolean | undefined;
|
|
225
223
|
isShared?: boolean | undefined;
|
|
224
|
+
clientId?: string | undefined;
|
|
225
|
+
clientSecret?: string | undefined;
|
|
226
226
|
facebookConfigId?: string | undefined;
|
|
227
227
|
microsoftTenantId?: string | undefined;
|
|
228
228
|
}> | undefined;
|
|
@@ -230,11 +230,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
230
230
|
}) | undefined;
|
|
231
231
|
emails: Omit<{}, never> & {
|
|
232
232
|
server: {
|
|
233
|
+
password?: string | undefined;
|
|
234
|
+
isShared?: boolean | undefined;
|
|
233
235
|
host?: string | undefined;
|
|
234
236
|
port?: number | undefined;
|
|
235
237
|
username?: string | undefined;
|
|
236
|
-
password?: string | undefined;
|
|
237
|
-
isShared?: boolean | undefined;
|
|
238
238
|
senderName?: string | undefined;
|
|
239
239
|
senderEmail?: string | undefined;
|
|
240
240
|
};
|
|
@@ -421,8 +421,8 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
421
421
|
} | undefined;
|
|
422
422
|
apiKeys: {
|
|
423
423
|
enabled?: {
|
|
424
|
-
user?: boolean | undefined;
|
|
425
424
|
team?: boolean | undefined;
|
|
425
|
+
user?: boolean | undefined;
|
|
426
426
|
} | undefined;
|
|
427
427
|
} | undefined;
|
|
428
428
|
domains: (Omit<{
|
|
@@ -434,10 +434,10 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
434
434
|
}> | undefined;
|
|
435
435
|
}) | undefined;
|
|
436
436
|
auth: (Omit<{
|
|
437
|
+
allowSignUp?: boolean | undefined;
|
|
437
438
|
password?: {
|
|
438
439
|
allowSignIn?: boolean | undefined;
|
|
439
440
|
} | undefined;
|
|
440
|
-
allowSignUp?: boolean | undefined;
|
|
441
441
|
otp?: {
|
|
442
442
|
allowSignIn?: boolean | undefined;
|
|
443
443
|
} | undefined;
|
|
@@ -447,8 +447,8 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
447
447
|
oauth?: {
|
|
448
448
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
449
449
|
providers?: Record<string, {
|
|
450
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
451
450
|
allowSignIn?: boolean | undefined;
|
|
451
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
452
452
|
allowConnectedAccounts?: boolean | undefined;
|
|
453
453
|
}> | undefined;
|
|
454
454
|
} | undefined;
|
|
@@ -456,18 +456,18 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
456
456
|
oauth?: (Omit<{
|
|
457
457
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
458
458
|
providers?: Record<string, {
|
|
459
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
460
459
|
allowSignIn?: boolean | undefined;
|
|
460
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
461
461
|
allowConnectedAccounts?: boolean | undefined;
|
|
462
462
|
}> | undefined;
|
|
463
463
|
}, never> & {
|
|
464
464
|
providers?: Record<string, {
|
|
465
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
466
|
-
clientId?: string | undefined;
|
|
467
|
-
clientSecret?: string | undefined;
|
|
468
465
|
allowSignIn?: boolean | undefined;
|
|
466
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
469
467
|
allowConnectedAccounts?: boolean | undefined;
|
|
470
468
|
isShared?: boolean | undefined;
|
|
469
|
+
clientId?: string | undefined;
|
|
470
|
+
clientSecret?: string | undefined;
|
|
471
471
|
facebookConfigId?: string | undefined;
|
|
472
472
|
microsoftTenantId?: string | undefined;
|
|
473
473
|
}> | undefined;
|
|
@@ -475,11 +475,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
475
475
|
}) | undefined;
|
|
476
476
|
emails: Omit<{}, never> & {
|
|
477
477
|
server: {
|
|
478
|
+
password?: string | undefined;
|
|
479
|
+
isShared?: boolean | undefined;
|
|
478
480
|
host?: string | undefined;
|
|
479
481
|
port?: number | undefined;
|
|
480
482
|
username?: string | undefined;
|
|
481
|
-
password?: string | undefined;
|
|
482
|
-
isShared?: boolean | undefined;
|
|
483
483
|
senderName?: string | undefined;
|
|
484
484
|
senderEmail?: string | undefined;
|
|
485
485
|
};
|
|
@@ -681,6 +681,7 @@ declare const organizationConfigDefaults: {
|
|
|
681
681
|
oauth: {
|
|
682
682
|
accountMergeStrategy: "link_method";
|
|
683
683
|
providers: (key: string) => {
|
|
684
|
+
isShared: true;
|
|
684
685
|
allowSignIn: false;
|
|
685
686
|
allowConnectedAccounts: false;
|
|
686
687
|
};
|
|
@@ -712,6 +713,10 @@ type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
|
|
|
712
713
|
type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
|
|
713
714
|
type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
|
|
714
715
|
type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
|
|
716
|
+
type ProjectConfigOverrideOverride = Config & DeepPartial<ProjectConfigOverride>;
|
|
717
|
+
type BranchConfigOverrideOverride = Config & DeepPartial<BranchConfigOverride>;
|
|
718
|
+
type EnvironmentConfigOverrideOverride = Config & DeepPartial<EnvironmentConfigOverride>;
|
|
719
|
+
type OrganizationConfigOverrideOverride = Config & DeepPartial<OrganizationConfigOverride>;
|
|
715
720
|
type ProjectIncompleteConfig = ProjectConfigNormalizedOverride;
|
|
716
721
|
type BranchIncompleteConfig = ProjectIncompleteConfig & BranchConfigNormalizedOverride;
|
|
717
722
|
type EnvironmentIncompleteConfig = BranchIncompleteConfig & EnvironmentConfigNormalizedOverride;
|
|
@@ -721,4 +726,4 @@ type BranchRenderedConfig = PrettifyType<ProjectRenderedConfig & ApplyDefaults<t
|
|
|
721
726
|
type EnvironmentRenderedConfig = PrettifyType<BranchRenderedConfig & ApplyDefaults<typeof environmentConfigDefaults, EnvironmentConfigStrippedNormalizedOverride>>;
|
|
722
727
|
type OrganizationRenderedConfig = PrettifyType<EnvironmentRenderedConfig & ApplyDefaults<typeof organizationConfigDefaults, OrganizationConfigStrippedNormalizedOverride>>;
|
|
723
728
|
|
|
724
|
-
export { type ApplyDefaults, type BranchConfigNormalizedOverride, type BranchConfigOverride, type BranchConfigStrippedNormalizedOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type DeepReplaceAllowFunctionsForObjects, type DeepReplaceFunctionsWithObjects, type EnvironmentConfigNormalizedOverride, type EnvironmentConfigOverride, type EnvironmentConfigStrippedNormalizedOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigNormalizedOverride, type OrganizationConfigOverride, type OrganizationConfigStrippedNormalizedOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigNormalizedOverride, type ProjectConfigOverride, type ProjectConfigStrippedNormalizedOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, applyDefaults, branchConfigDefaults, branchConfigSchema, configLevels, environmentConfigDefaults, environmentConfigSchema, organizationConfigDefaults, organizationConfigSchema, projectConfigDefaults, projectConfigSchema };
|
|
729
|
+
export { type ApplyDefaults, type BranchConfigNormalizedOverride, type BranchConfigOverride, type BranchConfigOverrideOverride, type BranchConfigStrippedNormalizedOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type DeepReplaceAllowFunctionsForObjects, type DeepReplaceFunctionsWithObjects, type EnvironmentConfigNormalizedOverride, type EnvironmentConfigOverride, type EnvironmentConfigOverrideOverride, type EnvironmentConfigStrippedNormalizedOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigNormalizedOverride, type OrganizationConfigOverride, type OrganizationConfigOverrideOverride, type OrganizationConfigStrippedNormalizedOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigNormalizedOverride, type ProjectConfigOverride, type ProjectConfigOverrideOverride, type ProjectConfigStrippedNormalizedOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, applyDefaults, branchConfigDefaults, branchConfigSchema, configLevels, environmentConfigDefaults, environmentConfigSchema, organizationConfigDefaults, organizationConfigSchema, projectConfigDefaults, projectConfigSchema };
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { DeepMerge } from '../utils/objects.js';
|
|
2
|
+
import { DeepMerge, DeepPartial } from '../utils/objects.js';
|
|
3
3
|
import { PrettifyType } from '../utils/types.js';
|
|
4
|
-
import { NormalizesTo } from './format.js';
|
|
4
|
+
import { NormalizesTo, Config } from './format.js';
|
|
5
5
|
|
|
6
6
|
declare const configLevels: readonly ["project", "branch", "environment", "organization"];
|
|
7
7
|
type ConfigLevel = typeof configLevels[number];
|
|
@@ -31,18 +31,18 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
31
31
|
} | undefined;
|
|
32
32
|
apiKeys: {
|
|
33
33
|
enabled?: {
|
|
34
|
-
user?: boolean | undefined;
|
|
35
34
|
team?: boolean | undefined;
|
|
35
|
+
user?: boolean | undefined;
|
|
36
36
|
} | undefined;
|
|
37
37
|
} | undefined;
|
|
38
38
|
domains: {
|
|
39
39
|
allowLocalhost?: boolean | undefined;
|
|
40
40
|
} | undefined;
|
|
41
41
|
auth: {
|
|
42
|
+
allowSignUp?: boolean | undefined;
|
|
42
43
|
password?: {
|
|
43
44
|
allowSignIn?: boolean | undefined;
|
|
44
45
|
} | undefined;
|
|
45
|
-
allowSignUp?: boolean | undefined;
|
|
46
46
|
otp?: {
|
|
47
47
|
allowSignIn?: boolean | undefined;
|
|
48
48
|
} | undefined;
|
|
@@ -52,8 +52,8 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
52
52
|
oauth?: {
|
|
53
53
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
54
54
|
providers?: Record<string, {
|
|
55
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
56
55
|
allowSignIn?: boolean | undefined;
|
|
56
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
57
57
|
allowConnectedAccounts?: boolean | undefined;
|
|
58
58
|
}> | undefined;
|
|
59
59
|
} | undefined;
|
|
@@ -124,8 +124,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
124
124
|
} | undefined;
|
|
125
125
|
apiKeys: {
|
|
126
126
|
enabled?: {
|
|
127
|
-
user?: boolean | undefined;
|
|
128
127
|
team?: boolean | undefined;
|
|
128
|
+
user?: boolean | undefined;
|
|
129
129
|
} | undefined;
|
|
130
130
|
} | undefined;
|
|
131
131
|
domains: (Omit<{
|
|
@@ -137,10 +137,10 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
137
137
|
}> | undefined;
|
|
138
138
|
}) | undefined;
|
|
139
139
|
auth: (Omit<{
|
|
140
|
+
allowSignUp?: boolean | undefined;
|
|
140
141
|
password?: {
|
|
141
142
|
allowSignIn?: boolean | undefined;
|
|
142
143
|
} | undefined;
|
|
143
|
-
allowSignUp?: boolean | undefined;
|
|
144
144
|
otp?: {
|
|
145
145
|
allowSignIn?: boolean | undefined;
|
|
146
146
|
} | undefined;
|
|
@@ -150,8 +150,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
150
150
|
oauth?: {
|
|
151
151
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
152
152
|
providers?: Record<string, {
|
|
153
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
154
153
|
allowSignIn?: boolean | undefined;
|
|
154
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
155
155
|
allowConnectedAccounts?: boolean | undefined;
|
|
156
156
|
}> | undefined;
|
|
157
157
|
} | undefined;
|
|
@@ -159,18 +159,18 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
159
159
|
oauth?: (Omit<{
|
|
160
160
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
161
161
|
providers?: Record<string, {
|
|
162
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
163
162
|
allowSignIn?: boolean | undefined;
|
|
163
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
164
164
|
allowConnectedAccounts?: boolean | undefined;
|
|
165
165
|
}> | undefined;
|
|
166
166
|
}, never> & {
|
|
167
167
|
providers?: Record<string, {
|
|
168
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
169
|
-
clientId?: string | undefined;
|
|
170
|
-
clientSecret?: string | undefined;
|
|
171
168
|
allowSignIn?: boolean | undefined;
|
|
169
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
172
170
|
allowConnectedAccounts?: boolean | undefined;
|
|
173
171
|
isShared?: boolean | undefined;
|
|
172
|
+
clientId?: string | undefined;
|
|
173
|
+
clientSecret?: string | undefined;
|
|
174
174
|
facebookConfigId?: string | undefined;
|
|
175
175
|
microsoftTenantId?: string | undefined;
|
|
176
176
|
}> | undefined;
|
|
@@ -178,21 +178,21 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
178
178
|
}) | undefined;
|
|
179
179
|
emails: Omit<{}, never> & {
|
|
180
180
|
server: {
|
|
181
|
+
password?: string | undefined;
|
|
182
|
+
isShared?: boolean | undefined;
|
|
181
183
|
host?: string | undefined;
|
|
182
184
|
port?: number | undefined;
|
|
183
185
|
username?: string | undefined;
|
|
184
|
-
password?: string | undefined;
|
|
185
|
-
isShared?: boolean | undefined;
|
|
186
186
|
senderName?: string | undefined;
|
|
187
187
|
senderEmail?: string | undefined;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
} & {
|
|
191
191
|
auth: (Omit<{
|
|
192
|
+
allowSignUp?: boolean | undefined;
|
|
192
193
|
password?: {
|
|
193
194
|
allowSignIn?: boolean | undefined;
|
|
194
195
|
} | undefined;
|
|
195
|
-
allowSignUp?: boolean | undefined;
|
|
196
196
|
otp?: {
|
|
197
197
|
allowSignIn?: boolean | undefined;
|
|
198
198
|
} | undefined;
|
|
@@ -202,8 +202,8 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
202
202
|
oauth?: {
|
|
203
203
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
204
204
|
providers?: Record<string, {
|
|
205
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
206
205
|
allowSignIn?: boolean | undefined;
|
|
206
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
207
207
|
allowConnectedAccounts?: boolean | undefined;
|
|
208
208
|
}> | undefined;
|
|
209
209
|
} | undefined;
|
|
@@ -211,18 +211,18 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
211
211
|
oauth?: (Omit<{
|
|
212
212
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
213
213
|
providers?: Record<string, {
|
|
214
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
215
214
|
allowSignIn?: boolean | undefined;
|
|
215
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
216
216
|
allowConnectedAccounts?: boolean | undefined;
|
|
217
217
|
}> | undefined;
|
|
218
218
|
}, never> & {
|
|
219
219
|
providers?: Record<string, {
|
|
220
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
221
|
-
clientId?: string | undefined;
|
|
222
|
-
clientSecret?: string | undefined;
|
|
223
220
|
allowSignIn?: boolean | undefined;
|
|
221
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
224
222
|
allowConnectedAccounts?: boolean | undefined;
|
|
225
223
|
isShared?: boolean | undefined;
|
|
224
|
+
clientId?: string | undefined;
|
|
225
|
+
clientSecret?: string | undefined;
|
|
226
226
|
facebookConfigId?: string | undefined;
|
|
227
227
|
microsoftTenantId?: string | undefined;
|
|
228
228
|
}> | undefined;
|
|
@@ -230,11 +230,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
230
230
|
}) | undefined;
|
|
231
231
|
emails: Omit<{}, never> & {
|
|
232
232
|
server: {
|
|
233
|
+
password?: string | undefined;
|
|
234
|
+
isShared?: boolean | undefined;
|
|
233
235
|
host?: string | undefined;
|
|
234
236
|
port?: number | undefined;
|
|
235
237
|
username?: string | undefined;
|
|
236
|
-
password?: string | undefined;
|
|
237
|
-
isShared?: boolean | undefined;
|
|
238
238
|
senderName?: string | undefined;
|
|
239
239
|
senderEmail?: string | undefined;
|
|
240
240
|
};
|
|
@@ -421,8 +421,8 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
421
421
|
} | undefined;
|
|
422
422
|
apiKeys: {
|
|
423
423
|
enabled?: {
|
|
424
|
-
user?: boolean | undefined;
|
|
425
424
|
team?: boolean | undefined;
|
|
425
|
+
user?: boolean | undefined;
|
|
426
426
|
} | undefined;
|
|
427
427
|
} | undefined;
|
|
428
428
|
domains: (Omit<{
|
|
@@ -434,10 +434,10 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
434
434
|
}> | undefined;
|
|
435
435
|
}) | undefined;
|
|
436
436
|
auth: (Omit<{
|
|
437
|
+
allowSignUp?: boolean | undefined;
|
|
437
438
|
password?: {
|
|
438
439
|
allowSignIn?: boolean | undefined;
|
|
439
440
|
} | undefined;
|
|
440
|
-
allowSignUp?: boolean | undefined;
|
|
441
441
|
otp?: {
|
|
442
442
|
allowSignIn?: boolean | undefined;
|
|
443
443
|
} | undefined;
|
|
@@ -447,8 +447,8 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
447
447
|
oauth?: {
|
|
448
448
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
449
449
|
providers?: Record<string, {
|
|
450
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
451
450
|
allowSignIn?: boolean | undefined;
|
|
451
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
452
452
|
allowConnectedAccounts?: boolean | undefined;
|
|
453
453
|
}> | undefined;
|
|
454
454
|
} | undefined;
|
|
@@ -456,18 +456,18 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
456
456
|
oauth?: (Omit<{
|
|
457
457
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
458
458
|
providers?: Record<string, {
|
|
459
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
460
459
|
allowSignIn?: boolean | undefined;
|
|
460
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
461
461
|
allowConnectedAccounts?: boolean | undefined;
|
|
462
462
|
}> | undefined;
|
|
463
463
|
}, never> & {
|
|
464
464
|
providers?: Record<string, {
|
|
465
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
466
|
-
clientId?: string | undefined;
|
|
467
|
-
clientSecret?: string | undefined;
|
|
468
465
|
allowSignIn?: boolean | undefined;
|
|
466
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
469
467
|
allowConnectedAccounts?: boolean | undefined;
|
|
470
468
|
isShared?: boolean | undefined;
|
|
469
|
+
clientId?: string | undefined;
|
|
470
|
+
clientSecret?: string | undefined;
|
|
471
471
|
facebookConfigId?: string | undefined;
|
|
472
472
|
microsoftTenantId?: string | undefined;
|
|
473
473
|
}> | undefined;
|
|
@@ -475,11 +475,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
475
475
|
}) | undefined;
|
|
476
476
|
emails: Omit<{}, never> & {
|
|
477
477
|
server: {
|
|
478
|
+
password?: string | undefined;
|
|
479
|
+
isShared?: boolean | undefined;
|
|
478
480
|
host?: string | undefined;
|
|
479
481
|
port?: number | undefined;
|
|
480
482
|
username?: string | undefined;
|
|
481
|
-
password?: string | undefined;
|
|
482
|
-
isShared?: boolean | undefined;
|
|
483
483
|
senderName?: string | undefined;
|
|
484
484
|
senderEmail?: string | undefined;
|
|
485
485
|
};
|
|
@@ -681,6 +681,7 @@ declare const organizationConfigDefaults: {
|
|
|
681
681
|
oauth: {
|
|
682
682
|
accountMergeStrategy: "link_method";
|
|
683
683
|
providers: (key: string) => {
|
|
684
|
+
isShared: true;
|
|
684
685
|
allowSignIn: false;
|
|
685
686
|
allowConnectedAccounts: false;
|
|
686
687
|
};
|
|
@@ -712,6 +713,10 @@ type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
|
|
|
712
713
|
type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
|
|
713
714
|
type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
|
|
714
715
|
type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
|
|
716
|
+
type ProjectConfigOverrideOverride = Config & DeepPartial<ProjectConfigOverride>;
|
|
717
|
+
type BranchConfigOverrideOverride = Config & DeepPartial<BranchConfigOverride>;
|
|
718
|
+
type EnvironmentConfigOverrideOverride = Config & DeepPartial<EnvironmentConfigOverride>;
|
|
719
|
+
type OrganizationConfigOverrideOverride = Config & DeepPartial<OrganizationConfigOverride>;
|
|
715
720
|
type ProjectIncompleteConfig = ProjectConfigNormalizedOverride;
|
|
716
721
|
type BranchIncompleteConfig = ProjectIncompleteConfig & BranchConfigNormalizedOverride;
|
|
717
722
|
type EnvironmentIncompleteConfig = BranchIncompleteConfig & EnvironmentConfigNormalizedOverride;
|
|
@@ -721,4 +726,4 @@ type BranchRenderedConfig = PrettifyType<ProjectRenderedConfig & ApplyDefaults<t
|
|
|
721
726
|
type EnvironmentRenderedConfig = PrettifyType<BranchRenderedConfig & ApplyDefaults<typeof environmentConfigDefaults, EnvironmentConfigStrippedNormalizedOverride>>;
|
|
722
727
|
type OrganizationRenderedConfig = PrettifyType<EnvironmentRenderedConfig & ApplyDefaults<typeof organizationConfigDefaults, OrganizationConfigStrippedNormalizedOverride>>;
|
|
723
728
|
|
|
724
|
-
export { type ApplyDefaults, type BranchConfigNormalizedOverride, type BranchConfigOverride, type BranchConfigStrippedNormalizedOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type DeepReplaceAllowFunctionsForObjects, type DeepReplaceFunctionsWithObjects, type EnvironmentConfigNormalizedOverride, type EnvironmentConfigOverride, type EnvironmentConfigStrippedNormalizedOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigNormalizedOverride, type OrganizationConfigOverride, type OrganizationConfigStrippedNormalizedOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigNormalizedOverride, type ProjectConfigOverride, type ProjectConfigStrippedNormalizedOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, applyDefaults, branchConfigDefaults, branchConfigSchema, configLevels, environmentConfigDefaults, environmentConfigSchema, organizationConfigDefaults, organizationConfigSchema, projectConfigDefaults, projectConfigSchema };
|
|
729
|
+
export { type ApplyDefaults, type BranchConfigNormalizedOverride, type BranchConfigOverride, type BranchConfigOverrideOverride, type BranchConfigStrippedNormalizedOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type DeepReplaceAllowFunctionsForObjects, type DeepReplaceFunctionsWithObjects, type EnvironmentConfigNormalizedOverride, type EnvironmentConfigOverride, type EnvironmentConfigOverrideOverride, type EnvironmentConfigStrippedNormalizedOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigNormalizedOverride, type OrganizationConfigOverride, type OrganizationConfigOverrideOverride, type OrganizationConfigStrippedNormalizedOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigNormalizedOverride, type ProjectConfigOverride, type ProjectConfigOverrideOverride, type ProjectConfigStrippedNormalizedOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, applyDefaults, branchConfigDefaults, branchConfigSchema, configLevels, environmentConfigDefaults, environmentConfigSchema, organizationConfigDefaults, organizationConfigSchema, projectConfigDefaults, projectConfigSchema };
|
package/dist/config/schema.js
CHANGED
|
@@ -42,12 +42,13 @@ __export(schema_exports, {
|
|
|
42
42
|
projectConfigSchema: () => projectConfigSchema
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(schema_exports);
|
|
45
|
-
var schemaFields = __toESM(require("../schema-fields")
|
|
45
|
+
var schemaFields = __toESM(require("../schema-fields"));
|
|
46
46
|
var import_schema_fields = require("../schema-fields");
|
|
47
47
|
var import_oauth = require("../utils/oauth");
|
|
48
48
|
var import_objects = require("../utils/objects");
|
|
49
49
|
var configLevels = ["project", "branch", "environment", "organization"];
|
|
50
50
|
var permissionRegex = /^\$?[a-z0-9_:]+$/;
|
|
51
|
+
var customPermissionRegex = /^[a-z0-9_:]+$/;
|
|
51
52
|
var projectConfigSchema = (0, import_schema_fields.yupObject)({});
|
|
52
53
|
var branchRbacDefaultPermissions = (0, import_schema_fields.yupRecord)(
|
|
53
54
|
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
@@ -55,7 +56,7 @@ var branchRbacDefaultPermissions = (0, import_schema_fields.yupRecord)(
|
|
|
55
56
|
).optional();
|
|
56
57
|
var branchRbacSchema = (0, import_schema_fields.yupObject)({
|
|
57
58
|
permissions: (0, import_schema_fields.yupRecord)(
|
|
58
|
-
(0, import_schema_fields.yupString)().optional().matches(
|
|
59
|
+
(0, import_schema_fields.yupString)().optional().matches(customPermissionRegex),
|
|
59
60
|
(0, import_schema_fields.yupObject)({
|
|
60
61
|
description: (0, import_schema_fields.yupString)().optional(),
|
|
61
62
|
scope: (0, import_schema_fields.yupString)().oneOf(["team", "project"]).optional(),
|
|
@@ -202,6 +203,7 @@ var organizationConfigDefaults = {
|
|
|
202
203
|
oauth: {
|
|
203
204
|
accountMergeStrategy: "link_method",
|
|
204
205
|
providers: (key) => ({
|
|
206
|
+
isShared: true,
|
|
205
207
|
allowSignIn: false,
|
|
206
208
|
allowConnectedAccounts: false
|
|
207
209
|
})
|
|
@@ -214,7 +216,7 @@ var organizationConfigDefaults = {
|
|
|
214
216
|
}
|
|
215
217
|
};
|
|
216
218
|
function applyDefaults(defaults, config) {
|
|
217
|
-
const res =
|
|
219
|
+
const res = typeof defaults === "function" ? {} : (0, import_objects.mapValues)(defaults, (v) => typeof v === "function" ? {} : typeof v === "object" ? applyDefaults(v, {}) : v);
|
|
218
220
|
for (const [key, mergeValue] of Object.entries(config)) {
|
|
219
221
|
const baseValue = typeof defaults === "function" ? defaults(key) : (0, import_objects.has)(defaults, key) ? (0, import_objects.get)(defaults, key) : void 0;
|
|
220
222
|
if (baseValue !== void 0) {
|