@adminide-stack/core 13.5.30-alpha.42 → 13.5.30-alpha.46

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.
@@ -5,6 +5,12 @@ export declare const DEFAULT_ISSUE_TAG_TYPE_ID = "dd0e8400-e29b-41d4-a716-446655
5
5
  export declare const DEFAULT_PRODUCTION_TAG_ID = "aa0e8400-e29b-41d4-a716-446655440005";
6
6
  export declare const DEFAULT_STAGING_TAG_ID = "bb0e8400-e29b-41d4-a716-446655440006";
7
7
  export declare const DEFAULT_DEVELOPMENT_TAG_ID = "cc0e8400-e29b-41d4-a716-446655440007";
8
+ /**
9
+ * The document id of the root Production tag (its static UUID, dashes dropped, cut to 24 hex). Production is
10
+ * this one tag for every project: secrets, credentials and tokens are told apart by project, not by a
11
+ * per-project Production tag.
12
+ */
13
+ export declare const DEFAULT_PRODUCTION_TAG_OBJECT_ID: string;
8
14
  export declare const DEFAULT_SYSTEM_ACCOUNT_ID = "880e8400-e29b-41d4-a716-446655440003";
9
15
  export declare const DEFAULT_SYSTEM_USERNAME = "system";
10
16
  export declare const DEFAULT_SYSTEM_EMAIL = "system@adminide.com";
@@ -8,6 +8,12 @@ const DEFAULT_ISSUE_TAG_TYPE_ID = 'dd0e8400-e29b-41d4-a716-446655440008';
8
8
  const DEFAULT_PRODUCTION_TAG_ID = 'aa0e8400-e29b-41d4-a716-446655440005';
9
9
  const DEFAULT_STAGING_TAG_ID = 'bb0e8400-e29b-41d4-a716-446655440006';
10
10
  const DEFAULT_DEVELOPMENT_TAG_ID = 'cc0e8400-e29b-41d4-a716-446655440007';
11
+ /**
12
+ * The document id of the root Production tag (its static UUID, dashes dropped, cut to 24 hex). Production is
13
+ * this one tag for every project: secrets, credentials and tokens are told apart by project, not by a
14
+ * per-project Production tag.
15
+ */
16
+ const DEFAULT_PRODUCTION_TAG_OBJECT_ID = DEFAULT_PRODUCTION_TAG_ID.replace(/-/g, '').substring(0, 24);
11
17
  // Static account IDs for system and anonymous users
12
18
  // These accounts are created during migration and should never be deleted
13
19
  const DEFAULT_SYSTEM_ACCOUNT_ID = '880e8400-e29b-41d4-a716-446655440003';
@@ -22,4 +28,4 @@ const DEFAULT_ANONYMOUS_PUBLISHER_NAME = 'anonymous';
22
28
  const DEFAULT_ANONYMOUS_PUBLISHER_DISPLAY_NAME = 'Anonymous';
23
29
  const VAULT_DEFAULT_DIR = 'default';
24
30
  // Static addon category tag type ID
25
- const DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID = '780e8400-e29b-41d4-a716-446655440008';export{DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID,DEFAULT_ANONYMOUS_ACCOUNT_ID,DEFAULT_ANONYMOUS_EMAIL,DEFAULT_ANONYMOUS_PUBLISHER_DISPLAY_NAME,DEFAULT_ANONYMOUS_PUBLISHER_ID,DEFAULT_ANONYMOUS_PUBLISHER_NAME,DEFAULT_ANONYMOUS_USERNAME,DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID,DEFAULT_DEVELOPMENT_TAG_ID,DEFAULT_ENVIRONMENT_TAG_TYPE_ID,DEFAULT_ISSUE_TAG_TYPE_ID,DEFAULT_PRODUCTION_TAG_ID,DEFAULT_STAGING_TAG_ID,DEFAULT_SYSTEM_ACCOUNT_ID,DEFAULT_SYSTEM_EMAIL,DEFAULT_SYSTEM_USERNAME,VAULT_DEFAULT_DIR};//# sourceMappingURL=defaultIds.js.map
31
+ const DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID = '780e8400-e29b-41d4-a716-446655440008';export{DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID,DEFAULT_ANONYMOUS_ACCOUNT_ID,DEFAULT_ANONYMOUS_EMAIL,DEFAULT_ANONYMOUS_PUBLISHER_DISPLAY_NAME,DEFAULT_ANONYMOUS_PUBLISHER_ID,DEFAULT_ANONYMOUS_PUBLISHER_NAME,DEFAULT_ANONYMOUS_USERNAME,DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID,DEFAULT_DEVELOPMENT_TAG_ID,DEFAULT_ENVIRONMENT_TAG_TYPE_ID,DEFAULT_ISSUE_TAG_TYPE_ID,DEFAULT_PRODUCTION_TAG_ID,DEFAULT_PRODUCTION_TAG_OBJECT_ID,DEFAULT_STAGING_TAG_ID,DEFAULT_SYSTEM_ACCOUNT_ID,DEFAULT_SYSTEM_EMAIL,DEFAULT_SYSTEM_USERNAME,VAULT_DEFAULT_DIR};//# sourceMappingURL=defaultIds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultIds.js","sources":["../../src/constants/defaultIds.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACO,MAAM,qBAAqB,GAAG;AAE9B,MAAM,cAAc,GAAG;AAEvB,MAAM,+BAA+B,GAAG;AACxC,MAAM,yBAAyB,GAAG;AAEzC;AACO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,0BAA0B,GAAG;AAE1C;AACA;AACO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG;AAChC,MAAM,oBAAoB,GAAG;AAE7B,MAAM,4BAA4B,GAAG;AACrC,MAAM,0BAA0B,GAAG;AACnC,MAAM,uBAAuB,GAAG;AAEvC;AACO,MAAM,8BAA8B,GAAG;AACvC,MAAM,gCAAgC,GAAG;AACzC,MAAM,wCAAwC,GAAG;AAEjD,MAAM,iBAAiB,GAAG;AAEjC;AACO,MAAM,kCAAkC,GAAG"}
1
+ {"version":3,"file":"defaultIds.js","sources":["../../src/constants/defaultIds.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACO,MAAM,qBAAqB,GAAG;AAE9B,MAAM,cAAc,GAAG;AAEvB,MAAM,+BAA+B,GAAG;AACxC,MAAM,yBAAyB,GAAG;AAEzC;AACO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,0BAA0B,GAAG;AAE1C;;;;AAIG;AACI,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE;AAE3G;AACA;AACO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG;AAChC,MAAM,oBAAoB,GAAG;AAE7B,MAAM,4BAA4B,GAAG;AACrC,MAAM,0BAA0B,GAAG;AACnC,MAAM,uBAAuB,GAAG;AAEvC;AACO,MAAM,8BAA8B,GAAG;AACvC,MAAM,gCAAgC,GAAG;AACzC,MAAM,wCAAwC,GAAG;AAEjD,MAAM,iBAAiB,GAAG;AAEjC;AACO,MAAM,kCAAkC,GAAG"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{AUTH_RETURN_TO_PARAM,NATS_HEMERA_ADMINIDE_WORKSPACE,NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER}from'./constants/constants.js';export{ALL_COUNTRIES_LIMIT,COMMON_COUNTRIES,getCommonCountriesCriteria}from'./constants/countries.js';export{DEFAULT_CPU,DEFAULT_HDD,DEFAULT_RAM}from'./constants/default-workspace-config.js';export{CONNECTOR_REDIRECT_URI_TEMPLATE,DEFAULT_CONTRIBUTION_TENANT_ID,DEFAULT_TENANT_ID,GLOBAL_CONFIGURATION_FILE,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_PATTERN_WITH_SUBSTITUTION,OVERRIDE_PROPERTY,OVERRIDE_PROPERTY_PATTERN,SETTINGS_OVERRRIDE_NODE_ID,SKIP_SETTINGS_REFERENCE_RESOLUTION,USER_CONFIGURATION_FILE}from'./constants/configuration.js';export{ASANA_WEBHOOK_ENDPOINT,ORG_BASE_PATH,ORG_STD_ROUTES}from'./constants/urls.js';export{IntegrationConfigurationRoute,hasOrganizationContext}from'./constants/routes.js';export{BillingPlan}from'./constants/billing-plan.js';export{DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID,DEFAULT_ANONYMOUS_ACCOUNT_ID,DEFAULT_ANONYMOUS_EMAIL,DEFAULT_ANONYMOUS_PUBLISHER_DISPLAY_NAME,DEFAULT_ANONYMOUS_PUBLISHER_ID,DEFAULT_ANONYMOUS_PUBLISHER_NAME,DEFAULT_ANONYMOUS_USERNAME,DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID,DEFAULT_DEVELOPMENT_TAG_ID,DEFAULT_ENVIRONMENT_TAG_TYPE_ID,DEFAULT_ISSUE_TAG_TYPE_ID,DEFAULT_PRODUCTION_TAG_ID,DEFAULT_STAGING_TAG_ID,DEFAULT_SYSTEM_ACCOUNT_ID,DEFAULT_SYSTEM_EMAIL,DEFAULT_SYSTEM_USERNAME,VAULT_DEFAULT_DIR}from'./constants/defaultIds.js';export{LOCAL_MACHINE_SCOPES,ORGANIZATION_SCOPES,REMOTE_MACHINE_SCOPES,RESOURCE_SCOPES,USER_SCOPES}from'./interfaces/configuration/configuration.js';export{ApplicationState,IOrganizationContext,IOrganizationResource}from'./interfaces/organization/organization-context.js';export{Extensions}from'@workbench-stack/core/lib/constants/extensions.js';export{LifecyclePhase,ShutdownReason,StartupKind}from'@workbench-stack/core/lib/interfaces/lifecycle/lifecycle.js';export{PermissionBehavior}from'./interfaces/permissions.js';export*from'common/lib/generated/generated-models.js';export{getFilteredRoutes,getFilteredTabs,getTtl}from'./utils/utils.js';export{configureForCurrentBranch,configureForUpcomingBranch,convertToResourceUri,createDirectResourceUri,createStandardResourceUri,generateHashId,normalizeResourceUri,resourcePath,setupResourceUriConfiguration,strictConvertToResourceUri}from'./utils/resourceUriConversion.js';export{generateApplicationUri,generateMachineUri,generateOrgUri,generateOrgUriById,generateProxyUserUri,generateResourceUri,generateUri,generateUserUri}from'./utils/generate-uri.js';export{RESERVED_CDECODE_PARAMS,determineConfigurationTarget,formatResourceIdWithIdField,generateCdecodeUri,isReservedCdecodeParam,parseCdecodeUri,parseResourceIdWithIdField,validateUserQueryParams}from'./utils/cdecodeUri.js';export{generateApplicationRoleResource,generateRegisteredRoleURI}from'./utils/roles-utils.js';export{getScopes}from'./utils/configuration-utils.js';export{omitDeep}from'./utils/omit-deep.js';export{generateSettingsId}from'./utils/generated-settings-id.js';export{validateEmail}from'./utils/validations.js';export{toMilliSeconds}from'./utils/date-utils.js';export{expand,flatten,flattenObject}from'./utils/flatten-utils.js';export{generateUserAlias}from'./utils/generateUserAlias.js';export{getUserAlias}from'./utils/getUserAlias.js';export{getLogger}from'./utils/getLogger.js';export{FileNameToTarget,SettingsFileName,determineSchemaFromUri,extractExtensionNameFromFragment,extractExtensionNameFromPathSegments,extractFileNameFromPath,generateDefaultConfigurationUri,generateEffectiveExtensionsUri,generateInstalledExtensionsUri,generatePublicExtensionsUri,generateSystemDefaultsUri,getDefaultSettingsURI,getEditableSettingsURI,getOpenSettings,getSettingsFileName,getTargetFromFileName,getTargetFromSettingsUri,isDefaultSettingsUri,mapAuthorityToSchemaId,mapFragmentToSchemaId,mapSchemaIdToAuthority,mapStringToSchemaId,parseDefaultConfigurationUri,parseExtensionFromDefaultSettingsUri}from'./utils/preferenceUri.js';export{reviveUri}from'./utils/reviveUri.js';export{buildExtensionNodeContext,buildExtensionSettingsNodeContext,buildNodeContext,buildPermissionNodeContext,buildPolicyNodeContext,buildRoleNodeContext,buildUiLayoutNodeContext,isSystemContribution}from'./utils/nodeContext.js';export{CONTEXT_ROOT,configurationContextPath,contextPath}from'./utils/context-path.js';export{splitCdecodeUri,splitOrgUri}from'./utils/splitCdecodeUri.js';export{generatePath}from'./utils/generatePath.js';export{resolveContextPlaceholders,resolvePlaceholdersSync,resolveResourceParamsPlaceholders}from'./utils/resolveContextPlaceholders.js';export{SLUG_REGEX,SLUG_VALIDATION_MESSAGE,SLUG_VALIDATOR_CONFIG,getSlugValidationMessage,isValidSlug,slugValidator,slugify}from'./utils/slug-utils.js';export{pubSub}from'./utils/pubsub-utility.js';export{denylistKey,isTokenRevoked}from'./utils/secret-api-token-denylist.js';export{APPROVED_SITE_PAGES,APPROVED_SURFACE_APEXES,isAllowedSurfaceOrigin,surfaceDisplayName}from'./utils/surface-origin.js';export{Disposable,DisposableCollection}from'./core/disposable.js';export{BaseDisposable}from'./core/BaseDisposable.js';export{Emitter,Event,WaitUntilEvent}from'./core/event.js';export{Path}from'./core/path.js';export{OrganizationContext,OrganizationResource,toOrganizationResource,toOrganizationResources,toUri}from'./core/organization/organization.js';export{OrganizationConfiguration}from'./core/organization/configuration.js';export{isOrganizationIdentifier,isRawFileOrganizationResource,isRawUriOrganizationResource,isSingleResourceOrganizationIdentifier,isSingleResourceOrganizationInitializationPayload}from'./core/organization/helpers/organization-helpers.js';export{ConfigurationTargetConfigurationMapper,ConfigurationTargetToString,SettingsTypeToConfiguraitonTarget,addToValueTree,getConfigurationValue,getMigratedSettingValue,isConfigurationOverrides,keyFromOverrideIdentifier,merge,overrideIdentifierFromKey,removeFromValueTree,toValuesTree}from'./core/configurations/helpers/configuration.js';export{ConfigurationModel}from'./core/configurations/models/ConfigurationModel.js';export{EnhancedConfigurationModel}from'./core/configurations/models/ConfigurationModelWrapper.js';export{Configuration,OVERRIDE_PROPERTY_REGEX,compare,overrideIdentifiersFromKey}from'./core/configurations/configuration.js';export{ConfigurationChangeEvent}from'./core/configurations/events/ConfigurationChangeEvent.js';export{parseConfiguration}from'./core/configurations/parser/configurationParser.js';export{createConfigurationModel,extractConfiguration,extractConfigurationWithModel,extractIdentifiersFromKey,getBaseKeys,getOverrideByIdentifier,getOverrideKeys,hasOverrides,isBracketKey,removeOverrideKeys}from'./core/configurations/utils/configurationExtractor.js';export{CdeCodeProvider}from'./core/in-memory-providers/cde-code-provider.js';export{AuthError}from'./errors/auth-error.js';export{AbstractOrganizationContextService}from'./services/abstract-organization-context-service.js';export{AbstractOrganizationConfigurationClientService}from'./services/abstract-configuration.js';export{PreDefineAccountPermissions}from'./modules/account-api/enums/index.js';export{BillingModules,PreDefineBillingPermissions}from'./modules/billing-api/enums/index.js';export{URI,uriToFsPath}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';export{ConfigurationScope}from'common';//# sourceMappingURL=index.js.map
1
+ export{AUTH_RETURN_TO_PARAM,NATS_HEMERA_ADMINIDE_WORKSPACE,NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER}from'./constants/constants.js';export{ALL_COUNTRIES_LIMIT,COMMON_COUNTRIES,getCommonCountriesCriteria}from'./constants/countries.js';export{DEFAULT_CPU,DEFAULT_HDD,DEFAULT_RAM}from'./constants/default-workspace-config.js';export{CONNECTOR_REDIRECT_URI_TEMPLATE,DEFAULT_CONTRIBUTION_TENANT_ID,DEFAULT_TENANT_ID,GLOBAL_CONFIGURATION_FILE,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_PATTERN_WITH_SUBSTITUTION,OVERRIDE_PROPERTY,OVERRIDE_PROPERTY_PATTERN,SETTINGS_OVERRRIDE_NODE_ID,SKIP_SETTINGS_REFERENCE_RESOLUTION,USER_CONFIGURATION_FILE}from'./constants/configuration.js';export{ASANA_WEBHOOK_ENDPOINT,ORG_BASE_PATH,ORG_STD_ROUTES}from'./constants/urls.js';export{IntegrationConfigurationRoute,hasOrganizationContext}from'./constants/routes.js';export{BillingPlan}from'./constants/billing-plan.js';export{DEFAULT_ADDON_CATEGORY_TAG_TYPE_ID,DEFAULT_ANONYMOUS_ACCOUNT_ID,DEFAULT_ANONYMOUS_EMAIL,DEFAULT_ANONYMOUS_PUBLISHER_DISPLAY_NAME,DEFAULT_ANONYMOUS_PUBLISHER_ID,DEFAULT_ANONYMOUS_PUBLISHER_NAME,DEFAULT_ANONYMOUS_USERNAME,DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID,DEFAULT_DEVELOPMENT_TAG_ID,DEFAULT_ENVIRONMENT_TAG_TYPE_ID,DEFAULT_ISSUE_TAG_TYPE_ID,DEFAULT_PRODUCTION_TAG_ID,DEFAULT_PRODUCTION_TAG_OBJECT_ID,DEFAULT_STAGING_TAG_ID,DEFAULT_SYSTEM_ACCOUNT_ID,DEFAULT_SYSTEM_EMAIL,DEFAULT_SYSTEM_USERNAME,VAULT_DEFAULT_DIR}from'./constants/defaultIds.js';export{LOCAL_MACHINE_SCOPES,ORGANIZATION_SCOPES,REMOTE_MACHINE_SCOPES,RESOURCE_SCOPES,USER_SCOPES}from'./interfaces/configuration/configuration.js';export{ApplicationState,IOrganizationContext,IOrganizationResource}from'./interfaces/organization/organization-context.js';export{Extensions}from'@workbench-stack/core/lib/constants/extensions.js';export{LifecyclePhase,ShutdownReason,StartupKind}from'@workbench-stack/core/lib/interfaces/lifecycle/lifecycle.js';export{PermissionBehavior}from'./interfaces/permissions.js';export*from'common/lib/generated/generated-models.js';export{getFilteredRoutes,getFilteredTabs,getTtl}from'./utils/utils.js';export{configureForCurrentBranch,configureForUpcomingBranch,convertToResourceUri,createDirectResourceUri,createStandardResourceUri,generateHashId,normalizeResourceUri,resourcePath,setupResourceUriConfiguration,strictConvertToResourceUri}from'./utils/resourceUriConversion.js';export{generateApplicationUri,generateMachineUri,generateOrgUri,generateOrgUriById,generateProxyUserUri,generateResourceUri,generateUri,generateUserUri}from'./utils/generate-uri.js';export{RESERVED_CDECODE_PARAMS,determineConfigurationTarget,formatResourceIdWithIdField,generateCdecodeUri,isReservedCdecodeParam,parseCdecodeUri,parseResourceIdWithIdField,validateUserQueryParams}from'./utils/cdecodeUri.js';export{generateApplicationRoleResource,generateRegisteredRoleURI}from'./utils/roles-utils.js';export{getScopes}from'./utils/configuration-utils.js';export{omitDeep}from'./utils/omit-deep.js';export{generateSettingsId}from'./utils/generated-settings-id.js';export{validateEmail}from'./utils/validations.js';export{toMilliSeconds}from'./utils/date-utils.js';export{expand,flatten,flattenObject}from'./utils/flatten-utils.js';export{generateUserAlias}from'./utils/generateUserAlias.js';export{getUserAlias}from'./utils/getUserAlias.js';export{getLogger}from'./utils/getLogger.js';export{FileNameToTarget,SettingsFileName,determineSchemaFromUri,extractExtensionNameFromFragment,extractExtensionNameFromPathSegments,extractFileNameFromPath,generateDefaultConfigurationUri,generateEffectiveExtensionsUri,generateInstalledExtensionsUri,generatePublicExtensionsUri,generateSystemDefaultsUri,getDefaultSettingsURI,getEditableSettingsURI,getOpenSettings,getSettingsFileName,getTargetFromFileName,getTargetFromSettingsUri,isDefaultSettingsUri,mapAuthorityToSchemaId,mapFragmentToSchemaId,mapSchemaIdToAuthority,mapStringToSchemaId,parseDefaultConfigurationUri,parseExtensionFromDefaultSettingsUri}from'./utils/preferenceUri.js';export{reviveUri}from'./utils/reviveUri.js';export{buildExtensionNodeContext,buildExtensionSettingsNodeContext,buildNodeContext,buildPermissionNodeContext,buildPolicyNodeContext,buildRoleNodeContext,buildUiLayoutNodeContext,isSystemContribution}from'./utils/nodeContext.js';export{CONTEXT_ROOT,configurationContextPath,contextPath}from'./utils/context-path.js';export{splitCdecodeUri,splitOrgUri}from'./utils/splitCdecodeUri.js';export{generatePath}from'./utils/generatePath.js';export{resolveContextPlaceholders,resolvePlaceholdersSync,resolveResourceParamsPlaceholders}from'./utils/resolveContextPlaceholders.js';export{SLUG_REGEX,SLUG_VALIDATION_MESSAGE,SLUG_VALIDATOR_CONFIG,getSlugValidationMessage,isValidSlug,slugValidator,slugify}from'./utils/slug-utils.js';export{pubSub}from'./utils/pubsub-utility.js';export{denylistKey,isTokenRevoked}from'./utils/secret-api-token-denylist.js';export{APPROVED_SITE_PAGES,APPROVED_SURFACE_APEXES,isAllowedSurfaceOrigin,surfaceDisplayName}from'./utils/surface-origin.js';export{canonicalEnvironmentTagId,canonicalizeEnvironmentTagsIn,canonicalizeEnvironmentTagsInString,environmentTagAliasCount,setEnvironmentTagAliases}from'./utils/environment-tag-aliases.js';export{Disposable,DisposableCollection}from'./core/disposable.js';export{BaseDisposable}from'./core/BaseDisposable.js';export{Emitter,Event,WaitUntilEvent}from'./core/event.js';export{Path}from'./core/path.js';export{OrganizationContext,OrganizationResource,toOrganizationResource,toOrganizationResources,toUri}from'./core/organization/organization.js';export{OrganizationConfiguration}from'./core/organization/configuration.js';export{isOrganizationIdentifier,isRawFileOrganizationResource,isRawUriOrganizationResource,isSingleResourceOrganizationIdentifier,isSingleResourceOrganizationInitializationPayload}from'./core/organization/helpers/organization-helpers.js';export{ConfigurationTargetConfigurationMapper,ConfigurationTargetToString,SettingsTypeToConfiguraitonTarget,addToValueTree,getConfigurationValue,getMigratedSettingValue,isConfigurationOverrides,keyFromOverrideIdentifier,merge,overrideIdentifierFromKey,removeFromValueTree,toValuesTree}from'./core/configurations/helpers/configuration.js';export{ConfigurationModel}from'./core/configurations/models/ConfigurationModel.js';export{EnhancedConfigurationModel}from'./core/configurations/models/ConfigurationModelWrapper.js';export{Configuration,OVERRIDE_PROPERTY_REGEX,compare,overrideIdentifiersFromKey}from'./core/configurations/configuration.js';export{ConfigurationChangeEvent}from'./core/configurations/events/ConfigurationChangeEvent.js';export{parseConfiguration}from'./core/configurations/parser/configurationParser.js';export{createConfigurationModel,extractConfiguration,extractConfigurationWithModel,extractIdentifiersFromKey,getBaseKeys,getOverrideByIdentifier,getOverrideKeys,hasOverrides,isBracketKey,removeOverrideKeys}from'./core/configurations/utils/configurationExtractor.js';export{CdeCodeProvider}from'./core/in-memory-providers/cde-code-provider.js';export{AuthError}from'./errors/auth-error.js';export{AbstractOrganizationContextService}from'./services/abstract-organization-context-service.js';export{AbstractOrganizationConfigurationClientService}from'./services/abstract-configuration.js';export{PreDefineAccountPermissions}from'./modules/account-api/enums/index.js';export{BillingModules,PreDefineBillingPermissions}from'./modules/billing-api/enums/index.js';export{URI,uriToFsPath}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';export{ConfigurationScope}from'common';//# sourceMappingURL=index.js.map
@@ -0,0 +1,19 @@
1
+ /** Replace the alias table: merged tag id -> the tag id it was merged into. */
2
+ export declare function setEnvironmentTagAliases(aliases: Iterable<readonly [string, string]>): void;
3
+ /** How many merged ids the table holds. */
4
+ export declare function environmentTagAliasCount(): number;
5
+ /** The tag an environment tag id stands for now: the tag it was merged into, else itself. */
6
+ export declare function canonicalEnvironmentTagId<T extends string | null | undefined>(tagId: T): T | string;
7
+ /**
8
+ * A string that names an environment, read as the tag it stands for now: a bare merged id, or a URI whose
9
+ * environment query parameter names one. A merged id anywhere else in a string is left alone - storage paths
10
+ * and file URLs embed the tag they were written under, and rewriting those would point at bytes that are not
11
+ * there.
12
+ */
13
+ export declare function canonicalizeEnvironmentTagsInString(value: string): string;
14
+ /**
15
+ * The same value with every environment it names read as it stands now (canonicalizeEnvironmentTagsInString),
16
+ * at any depth of plain objects and arrays - for request input such as GraphQL variables, where a client may
17
+ * send an id or a cdecode URI it saved before the merge. Returns the input itself when nothing changed.
18
+ */
19
+ export declare function canonicalizeEnvironmentTagsIn<T>(value: T): T;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Environment tag ids that were merged into another tag, and the tag each now means.
3
+ *
4
+ * Projects used to carry their own PRODUCTION tag beside the root Production tag, so "Production" was two
5
+ * environments whose credentials never resolved in each other. They were merged into root
6
+ * (MergeProjectProductionIntoRootTagMigration), but their ids live on outside the database: in minted tokens,
7
+ * saved CLI configs and cdecode URIs. The server loads the merged ids here, and every place a request names an
8
+ * environment maps them to the tag they were merged into.
9
+ *
10
+ * The table lives on `globalThis` so a second copy of this package in one process still reads the table the
11
+ * server loaded, instead of an empty one.
12
+ */
13
+ const REGISTRY_KEY = Symbol.for('@adminide-stack/core/environmentTagAliases');
14
+ /**
15
+ * An environment named in a URI's query: `?environmentTag=<id>` (cdecode URIs), `environmentTagId`, or
16
+ * `environment_tag_id` (the CLI's sign-in link).
17
+ */
18
+ const ENVIRONMENT_QUERY_PARAM = /([?&](?:environmentTag|environmentTagId|environment_tag_id)=)([0-9a-f]{24})/gi;
19
+ function registry() {
20
+ const holder = globalThis;
21
+ if (!holder[REGISTRY_KEY]) holder[REGISTRY_KEY] = {
22
+ aliases: new Map()
23
+ };
24
+ return holder[REGISTRY_KEY];
25
+ }
26
+ /** Replace the alias table: merged tag id -> the tag id it was merged into. */
27
+ function setEnvironmentTagAliases(aliases) {
28
+ const next = new Map();
29
+ for (const [from, to] of aliases) {
30
+ if (from && to && from !== to) next.set(from.toLowerCase(), to);
31
+ }
32
+ registry().aliases = next;
33
+ }
34
+ /** How many merged ids the table holds. */
35
+ function environmentTagAliasCount() {
36
+ return registry().aliases.size;
37
+ }
38
+ /** The tag an environment tag id stands for now: the tag it was merged into, else itself. */
39
+ function canonicalEnvironmentTagId(tagId) {
40
+ if (!tagId) return tagId;
41
+ return registry().aliases.get(tagId.toLowerCase()) ?? tagId;
42
+ }
43
+ /**
44
+ * A string that names an environment, read as the tag it stands for now: a bare merged id, or a URI whose
45
+ * environment query parameter names one. A merged id anywhere else in a string is left alone - storage paths
46
+ * and file URLs embed the tag they were written under, and rewriting those would point at bytes that are not
47
+ * there.
48
+ */
49
+ function canonicalizeEnvironmentTagsInString(value) {
50
+ const {
51
+ aliases
52
+ } = registry();
53
+ if (!aliases.size || !value) return value;
54
+ const bare = aliases.get(value.toLowerCase());
55
+ if (bare) return bare;
56
+ return value.replace(ENVIRONMENT_QUERY_PARAM, (param, name, id) => {
57
+ const canonical = aliases.get(id.toLowerCase());
58
+ return canonical ? `${name}${canonical}` : param;
59
+ });
60
+ }
61
+ /** `value` with the environments its strings name read as they stand now; the same value when nothing changed. */
62
+ function rewrite(value) {
63
+ if (typeof value === 'string') return canonicalizeEnvironmentTagsInString(value);
64
+ if (Array.isArray(value)) {
65
+ let changed = false;
66
+ const next = value.map(item => {
67
+ const rewritten = rewrite(item);
68
+ if (rewritten !== item) changed = true;
69
+ return rewritten;
70
+ });
71
+ return changed ? next : value;
72
+ }
73
+ if (value && typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype) {
74
+ let changed = false;
75
+ const next = {};
76
+ for (const [key, item] of Object.entries(value)) {
77
+ const rewritten = rewrite(item);
78
+ if (rewritten !== item) changed = true;
79
+ next[key] = rewritten;
80
+ }
81
+ return changed ? next : value;
82
+ }
83
+ return value;
84
+ }
85
+ /**
86
+ * The same value with every environment it names read as it stands now (canonicalizeEnvironmentTagsInString),
87
+ * at any depth of plain objects and arrays - for request input such as GraphQL variables, where a client may
88
+ * send an id or a cdecode URI it saved before the merge. Returns the input itself when nothing changed.
89
+ */
90
+ function canonicalizeEnvironmentTagsIn(value) {
91
+ if (!registry().aliases.size) return value;
92
+ return rewrite(value);
93
+ }export{canonicalEnvironmentTagId,canonicalizeEnvironmentTagsIn,canonicalizeEnvironmentTagsInString,environmentTagAliasCount,setEnvironmentTagAliases};//# sourceMappingURL=environment-tag-aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-tag-aliases.js","sources":["../../src/utils/environment-tag-aliases.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AACH,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,4CAA4C,CAAC;AAI7E;;;AAGG;AACH,MAAM,uBAAuB,GAAG,+EAA+E;AAE/G,SAAS,QAAQ,GAAA;QACb,MAAM,GAAM,UAAG;AACf,EAAA,IAAA,CAAA,MAAK,CAAA,YAAO,CAAA,EAAa,MAAA,CAAA,YAAA,CAAA,GAAA;WAAE,EAAA,IAAO,GAAA;AAClC,GAAA;AACJ,EAAC,OAAA,MAAA,CAAA,YAAA,CAAA;AAED;AACA;AACI,SAAU,wBAA6B,CAAA,OAAA,EAAA;QACvC,IAAK,GAAM,IAAC,GAAM,EAAE;AAChB,EAAA,KAAA,WAAQ,EAAI,EAAE,CAAA,IAAI,SAAS;YAAI,IAAI,EAAC,IAAI,IAAK,aAAa,CAAA,GAAI,CAAC,IAAC,CAAA,WAAA,EAAA,EAAA,EAAA,CAAA;;AAEpE,EAAA,QAAA,EAAQ,CAAA,OAAG,GAAO;AACtB;AAEA;SACgB,wBAAwB,GAAA;AACpC,EAAA,OAAA,UAAe,CAAA,OAAG,CAAA;AACtB;AAEA;AACM,SAAU,yBAAyB,CAAsC,KAAQ,EAAA;AACnF,EAAA,IAAA,CAAA,KAAK,EAAK,OAAA,KAAA;AAAE,EAAA,OAAA,WAAY,OAAC,CAAA,GAAA,CAAA,KAAA,CAAA,WAAA,EAAA,CAAA,IAAA,KAAA;AACzB;AACJ;AAEA;;;;;AAKG,SAAA,mCAAA,CAAA,KAAA,EAAA;AACH,EAAA,MAAM;AACF,IAAA;AACA,GAAA,GAAA,QAAK,EAAO;AAAiB,EAAA,IAAA,CAAA,OAAA,CAAO,QAAM,CAAA,KAAA,EAAA,OAAA,KAAA;QAC1C,IAAM,GAAI,OAAG,CAAA,GAAQ,CAAA,KAAI,CAAA,WAAM,EAAW,CAAA;AAC1C,EAAA,IAAA,IAAI,EAAI,OAAA,IAAA;AAAE,EAAA,OAAA,KAAA,CAAO,OAAK,CAAA,uBAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,EAAA,KAAA;AACtB,IAAA,MAAA,SAAa,GAAA,OAAQ,CAAA,GAAA,CAAA,EAAA,CAAA,WAAuB,EAAE,CAAC;WAC3C,SAAM,GAAS,CAAA,EAAG,IAAA,CAAA,EAAO,SAAQ,CAAA,CAAA,GAAA,KAAW;AAC5C,EAAA,CAAA,CAAA;AACJ;AACJ;AAEA,SAAA,OAAA,CAAA,KAAA,EAAA;AACA,EAAA,IAAA,OAAS,KAAQ,KAAc,QAAA,EAAA,OAAA,mCAAA,CAAA,KAAA,CAAA;MAC3B,KAAI,CAAA,OAAO,CAAK,KAAK,CAAA,EAAA;AAAU,IAAA,IAAA,OAAO,GAAA,KAAA;AACtC,IAAA,UAAU,GAAA,KAAQ,CAAA,GAAA,CAAK,IAAI,IAAA;YACnB,SAAO,GAAG,OAAM,CAAA,IAAA,CAAA;UACpB,cAAa,MAAS,OAAM,GAAI,IAAA;AAC5B,MAAA,OAAA;;kBACwB,GAAA,IAAO,QAAQ;AACvC,EAAA;AACJ,EAAA,IAAA,KAAG,IAAA,OAAA,KAAA,KAAA,QAAA,IAAA,MAAA,CAAA,cAAA,CAAA,KAAA,CAAA,KAAA,MAAA,CAAA,SAAA,EAAA;QACH,OAAO,GAAA,KAAQ;IACnB,MAAC,IAAA,GAAA,EAAA;AACD,IAAA,WAAS,CAAA,GAAI,EAAA,SAAY,MAAK,CAAA,aAAY,CAAA,EAAO;YACzC,SAAO,GAAG,OAAM,CAAA,IAAA,CAAA;UACpB,SAAU,KAA+B,IAAA,EAAA,OAAA,GAAA,IAAA;AACzC,MAAA,IAAA,CAAA,GAAK,CAAA,GAAA;AACD,IAAA;kBACI,GAAA,IAAS,QAAK;;AAClB,EAAA,OAAA,KAAA;;;;AAIR;AACJ;AAEA;;;;AAIG"}
@@ -0,0 +1 @@
1
+ export {};
@@ -23,3 +23,4 @@ export * from './slug-utils';
23
23
  export * from './pubsub-utility';
24
24
  export * from './secret-api-token-denylist';
25
25
  export * from './surface-origin';
26
+ export * from './environment-tag-aliases';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminide-stack/core",
3
- "version": "13.5.30-alpha.42",
3
+ "version": "13.5.30-alpha.46",
4
4
  "description": "AdminIDE core for higher packages to depend on",
5
5
  "license": "UNLICENSED",
6
6
  "author": "adminide-stack-user",
@@ -30,7 +30,7 @@
30
30
  "vscode-uri": "^3.0.8"
31
31
  },
32
32
  "devDependencies": {
33
- "common": "13.5.30-alpha.42"
33
+ "common": "13.5.30-alpha.46"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@common-stack/server-core": ">=9.2.1-alpha.0",
@@ -39,5 +39,5 @@
39
39
  "typescript": {
40
40
  "definition": "lib/index.d.ts"
41
41
  },
42
- "gitHead": "2d4f9a4ebb23f653c0b7c62068a0ac81261115f8"
42
+ "gitHead": "e2758b76ff8ddb6af27297bee851ee28e9e32ac1"
43
43
  }