fix: keep only source-map extracted node_modules, exclude pnpm artifacts

Restore node_modules to exact state from cli.js.map extraction:
- Move .ignored/ and .ignored_* files back to original package paths
- Remove pnpm symlinks (replaced by real source-map directories)
- Update .gitignore: only exclude /dist/, .pnpm/, .bin/, .ignored* dirs
- All package dist/ folders are now preserved as part of source-map files

After clone, run `pnpm install` to get pnpm-managed symlinks for building.
The committed node_modules contains the original TypeScript/JS source files
as bundled in cli.js.
This commit is contained in:
janlaywss
2026-03-31 21:09:32 +08:00
parent 0d5abe8837
commit a192e187e8
2211 changed files with 329136 additions and 84 deletions

View File

@@ -0,0 +1,44 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ALL_TENANTS, DeveloperSignOnClientId } from "../constants.js";
import { formatError } from "./logging.js";
export { processMultiTenantRequest } from "./processMultiTenantRequest.js";
/**
* @internal
*/
export function checkTenantId(logger, tenantId) {
if (!tenantId.match(/^[0-9a-zA-Z-.]+$/)) {
const error = new Error("Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names.");
logger.info(formatError("", error));
throw error;
}
}
/**
* @internal
*/
export function resolveTenantId(logger, tenantId, clientId) {
if (tenantId) {
checkTenantId(logger, tenantId);
return tenantId;
}
if (!clientId) {
clientId = DeveloperSignOnClientId;
}
if (clientId !== DeveloperSignOnClientId) {
return "common";
}
return "organizations";
}
/**
* @internal
*/
export function resolveAdditionallyAllowedTenantIds(additionallyAllowedTenants) {
if (!additionallyAllowedTenants || additionallyAllowedTenants.length === 0) {
return [];
}
if (additionallyAllowedTenants.includes("*")) {
return ALL_TENANTS;
}
return additionallyAllowedTenants;
}
//# sourceMappingURL=tenantIdUtils.js.map