wp-typia 0.22.3 → 0.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-bunli/.bunli/commands.gen.js +2098 -2027
- package/dist-bunli/{cli-sj5mtyzj.js → cli-6bhfzq5e.js} +41 -2
- package/dist-bunli/{cli-add-p3re8act.js → cli-add-1gqgshf0.js} +211 -395
- package/dist-bunli/{cli-pd5pqgre.js → cli-btbpt84c.js} +6 -11
- package/dist-bunli/{cli-tbd9x8b6.js → cli-ctddkm3n.js} +138 -12
- package/dist-bunli/{cli-doctor-cjm4rzbk.js → cli-doctor-w35s8y9w.js} +9 -64
- package/dist-bunli/{cli-gcbre1zs.js → cli-hb9vpsev.js} +6 -13
- package/dist-bunli/{cli-init-7gcthyn1.js → cli-init-z8sjmkvc.js} +11 -11
- package/dist-bunli/{cli-x0h03qqe.js → cli-j30rk466.js} +1406 -1304
- package/dist-bunli/{cli-mpgt29xc.js → cli-nzwpmw4y.js} +124 -38
- package/dist-bunli/cli-rwjkqjhs.js +88 -0
- package/dist-bunli/{cli-scaffold-x1dp8sz1.js → cli-scaffold-ad3bd555.js} +10 -10
- package/dist-bunli/{cli-prc42zqd.js → cli-xbzfx7qz.js} +7 -7
- package/dist-bunli/cli.js +7 -4
- package/dist-bunli/{command-list-wzej5c7v.js → command-list-scd6zqp8.js} +69 -132
- package/dist-bunli/{migrations-xfb2h7nf.js → migrations-skkzdvhm.js} +5 -5
- package/dist-bunli/node-cli.js +199 -221
- package/dist-bunli/{workspace-project-gxb499cp.js → workspace-project-7826tewa.js} +3 -2
- package/package.json +2 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
parsePackageManagerField
|
|
4
|
+
} from "./cli-6bhfzq5e.js";
|
|
5
|
+
|
|
2
6
|
// ../wp-typia-project-tools/src/runtime/workspace-project.ts
|
|
3
7
|
import fs from "fs";
|
|
4
8
|
import path from "path";
|
|
@@ -56,16 +60,7 @@ function getInvalidWorkspaceProjectReason(startDir) {
|
|
|
56
60
|
return null;
|
|
57
61
|
}
|
|
58
62
|
function parseWorkspacePackageManagerId(packageManagerField) {
|
|
59
|
-
|
|
60
|
-
switch (packageManagerId) {
|
|
61
|
-
case "bun":
|
|
62
|
-
case "npm":
|
|
63
|
-
case "pnpm":
|
|
64
|
-
case "yarn":
|
|
65
|
-
return packageManagerId;
|
|
66
|
-
default:
|
|
67
|
-
return "npm";
|
|
68
|
-
}
|
|
63
|
+
return parsePackageManagerField(packageManagerField) ?? "npm";
|
|
69
64
|
}
|
|
70
65
|
function tryResolveWorkspaceProject(startDir) {
|
|
71
66
|
let currentDir = path.resolve(startDir);
|
|
@@ -107,4 +102,4 @@ function resolveWorkspaceProject(startDir) {
|
|
|
107
102
|
|
|
108
103
|
export { WORKSPACE_TEMPLATE_PACKAGE, parseWorkspacePackageJson, getInvalidWorkspaceProjectReason, parseWorkspacePackageManagerId, tryResolveWorkspaceProject, resolveWorkspaceProject };
|
|
109
104
|
|
|
110
|
-
//# debugId=
|
|
105
|
+
//# debugId=79A99E0E108D7B5E64756E2164756E21
|
|
@@ -4,22 +4,14 @@ import {
|
|
|
4
4
|
} from "./cli-1sm60g1z.js";
|
|
5
5
|
import {
|
|
6
6
|
seedProjectMigrations
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-xbzfx7qz.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureMigrationDirectories,
|
|
10
10
|
isPlainObject,
|
|
11
11
|
stableJsonStringify,
|
|
12
12
|
writeInitialMigrationScaffold,
|
|
13
13
|
writeMigrationConfig
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import {
|
|
16
|
-
PACKAGE_MANAGER_IDS,
|
|
17
|
-
formatInstallCommand,
|
|
18
|
-
formatPackageExecCommand,
|
|
19
|
-
formatRunScript,
|
|
20
|
-
getPackageManager,
|
|
21
|
-
transformPackageManagerText
|
|
22
|
-
} from "./cli-sj5mtyzj.js";
|
|
14
|
+
} from "./cli-hb9vpsev.js";
|
|
23
15
|
import {
|
|
24
16
|
getBuiltInSharedTemplateLayerDir,
|
|
25
17
|
getBuiltInTemplateLayerDirs,
|
|
@@ -59,7 +51,7 @@ import {
|
|
|
59
51
|
toTitleCase,
|
|
60
52
|
validateBlockSlug,
|
|
61
53
|
validateNamespace
|
|
62
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-j30rk466.js";
|
|
63
55
|
import {
|
|
64
56
|
createManagedTempRoot
|
|
65
57
|
} from "./cli-t73q5aqz.js";
|
|
@@ -67,6 +59,14 @@ import {
|
|
|
67
59
|
CLI_DIAGNOSTIC_CODES,
|
|
68
60
|
createCliDiagnosticCodeError
|
|
69
61
|
} from "./cli-p95wr1q8.js";
|
|
62
|
+
import {
|
|
63
|
+
PACKAGE_MANAGER_IDS,
|
|
64
|
+
formatInstallCommand,
|
|
65
|
+
formatPackageExecCommand,
|
|
66
|
+
formatRunScript,
|
|
67
|
+
getPackageManager,
|
|
68
|
+
transformPackageManagerText
|
|
69
|
+
} from "./cli-6bhfzq5e.js";
|
|
70
70
|
import {
|
|
71
71
|
__commonJS,
|
|
72
72
|
__require,
|
|
@@ -11136,7 +11136,9 @@ import os2 from "os";
|
|
|
11136
11136
|
import path16 from "path";
|
|
11137
11137
|
var EXTERNAL_TEMPLATE_CACHE_ENV = "WP_TYPIA_EXTERNAL_TEMPLATE_CACHE";
|
|
11138
11138
|
var EXTERNAL_TEMPLATE_CACHE_DIR_ENV = "WP_TYPIA_EXTERNAL_TEMPLATE_CACHE_DIR";
|
|
11139
|
+
var EXTERNAL_TEMPLATE_CACHE_TTL_DAYS_ENV = "WP_TYPIA_EXTERNAL_TEMPLATE_CACHE_TTL_DAYS";
|
|
11139
11140
|
var CACHE_MARKER_FILE = "wp-typia-template-cache.json";
|
|
11141
|
+
var MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
11140
11142
|
var PRIVATE_CACHE_DIRECTORY_MODE = 448;
|
|
11141
11143
|
var REDACTED_CACHE_METADATA_VALUE = "[redacted]";
|
|
11142
11144
|
var DISABLED_CACHE_VALUES = new Set(["0", "false", "no", "off"]);
|
|
@@ -11150,6 +11152,7 @@ var CACHE_UNAVAILABLE_ERROR_CODES = new Set([
|
|
|
11150
11152
|
]);
|
|
11151
11153
|
var URL_LIKE_METADATA_KEY = /(url|uri|registry|tarball)/iu;
|
|
11152
11154
|
var SAFE_CACHE_NAMESPACE_SEGMENT = /^[A-Za-z0-9_.-]+$/u;
|
|
11155
|
+
var SAFE_CACHE_ENTRY_SEGMENT = /^[a-f0-9]{64}$/u;
|
|
11153
11156
|
function isExternalTemplateCacheEnabled(env = process.env) {
|
|
11154
11157
|
const rawValue2 = env[EXTERNAL_TEMPLATE_CACHE_ENV];
|
|
11155
11158
|
if (rawValue2 === undefined) {
|
|
@@ -11164,6 +11167,25 @@ function getExternalTemplateCacheRoot(env = process.env) {
|
|
|
11164
11167
|
}
|
|
11165
11168
|
return path16.join(os2.tmpdir(), `wp-typia-template-source-cache-${getCurrentUserCacheSegment()}`);
|
|
11166
11169
|
}
|
|
11170
|
+
function parseExternalTemplateCacheTtlDays(value) {
|
|
11171
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
11172
|
+
return null;
|
|
11173
|
+
}
|
|
11174
|
+
const ttlDays = typeof value === "number" ? value : Number(value.trim());
|
|
11175
|
+
if (!Number.isFinite(ttlDays) || ttlDays <= 0) {
|
|
11176
|
+
return null;
|
|
11177
|
+
}
|
|
11178
|
+
return ttlDays;
|
|
11179
|
+
}
|
|
11180
|
+
function resolveExternalTemplateCacheTtlMs(options = {}) {
|
|
11181
|
+
const env = options.env ?? process.env;
|
|
11182
|
+
const ttlDays = options.ttlDays === undefined ? parseExternalTemplateCacheTtlDays(env[EXTERNAL_TEMPLATE_CACHE_TTL_DAYS_ENV]) : parseExternalTemplateCacheTtlDays(options.ttlDays);
|
|
11183
|
+
if (ttlDays === null) {
|
|
11184
|
+
return null;
|
|
11185
|
+
}
|
|
11186
|
+
const ttlMs = ttlDays * MILLISECONDS_PER_DAY;
|
|
11187
|
+
return Number.isFinite(ttlMs) ? ttlMs : null;
|
|
11188
|
+
}
|
|
11167
11189
|
function createExternalTemplateCacheKey(keyParts) {
|
|
11168
11190
|
return createHash("sha256").update(JSON.stringify(keyParts)).digest("hex");
|
|
11169
11191
|
}
|
|
@@ -11330,6 +11352,108 @@ function parseCacheMarkerMetadata(markerText) {
|
|
|
11330
11352
|
function cacheMetadataMatches(actual, expected) {
|
|
11331
11353
|
return Object.entries(expected).every(([key, value]) => actual[key] === value);
|
|
11332
11354
|
}
|
|
11355
|
+
function getExternalTemplateCacheNowMs(now) {
|
|
11356
|
+
const nowMs = now instanceof Date ? now.getTime() : typeof now === "number" ? now : Date.now();
|
|
11357
|
+
return Number.isFinite(nowMs) ? nowMs : Date.now();
|
|
11358
|
+
}
|
|
11359
|
+
function isPathInsideDirectory(directory, candidatePath) {
|
|
11360
|
+
const relativePath = path16.relative(directory, candidatePath);
|
|
11361
|
+
return relativePath.length > 0 && !relativePath.startsWith("..") && !path16.isAbsolute(relativePath);
|
|
11362
|
+
}
|
|
11363
|
+
async function removeCacheEntryWithinRoot(cacheRoot, entryDir) {
|
|
11364
|
+
if (!isPathInsideDirectory(cacheRoot, entryDir)) {
|
|
11365
|
+
return false;
|
|
11366
|
+
}
|
|
11367
|
+
try {
|
|
11368
|
+
await fsp9.rm(entryDir, { force: true, recursive: true });
|
|
11369
|
+
return true;
|
|
11370
|
+
} catch {
|
|
11371
|
+
return false;
|
|
11372
|
+
}
|
|
11373
|
+
}
|
|
11374
|
+
async function pruneExternalTemplateCache(options = {}) {
|
|
11375
|
+
const env = options.env ?? process.env;
|
|
11376
|
+
const cacheRoot = getExternalTemplateCacheRoot(env);
|
|
11377
|
+
const ttlMs = resolveExternalTemplateCacheTtlMs({
|
|
11378
|
+
env,
|
|
11379
|
+
ttlDays: options.ttlDays
|
|
11380
|
+
});
|
|
11381
|
+
const result = {
|
|
11382
|
+
cacheRoot,
|
|
11383
|
+
prunedEntries: 0,
|
|
11384
|
+
scannedEntries: 0,
|
|
11385
|
+
skippedEntries: 0,
|
|
11386
|
+
ttlMs
|
|
11387
|
+
};
|
|
11388
|
+
if (ttlMs === null || !await isPrivateCacheDirectory(cacheRoot)) {
|
|
11389
|
+
return result;
|
|
11390
|
+
}
|
|
11391
|
+
let namespaceEntries;
|
|
11392
|
+
try {
|
|
11393
|
+
namespaceEntries = await fsp9.readdir(cacheRoot, { withFileTypes: true });
|
|
11394
|
+
} catch {
|
|
11395
|
+
return result;
|
|
11396
|
+
}
|
|
11397
|
+
const expiresBeforeMs = getExternalTemplateCacheNowMs(options.now) - ttlMs;
|
|
11398
|
+
for (const namespaceEntry of namespaceEntries) {
|
|
11399
|
+
if (!namespaceEntry.isDirectory()) {
|
|
11400
|
+
continue;
|
|
11401
|
+
}
|
|
11402
|
+
const namespaceDir = resolveCacheNamespaceDir(cacheRoot, namespaceEntry.name);
|
|
11403
|
+
if (!namespaceDir || !await isPrivateCacheDirectory(namespaceDir)) {
|
|
11404
|
+
result.skippedEntries += 1;
|
|
11405
|
+
continue;
|
|
11406
|
+
}
|
|
11407
|
+
let cacheEntries;
|
|
11408
|
+
try {
|
|
11409
|
+
cacheEntries = await fsp9.readdir(namespaceDir, { withFileTypes: true });
|
|
11410
|
+
} catch {
|
|
11411
|
+
result.skippedEntries += 1;
|
|
11412
|
+
continue;
|
|
11413
|
+
}
|
|
11414
|
+
for (const cacheEntry of cacheEntries) {
|
|
11415
|
+
if (!cacheEntry.isDirectory()) {
|
|
11416
|
+
continue;
|
|
11417
|
+
}
|
|
11418
|
+
if (!SAFE_CACHE_ENTRY_SEGMENT.test(cacheEntry.name)) {
|
|
11419
|
+
result.skippedEntries += 1;
|
|
11420
|
+
continue;
|
|
11421
|
+
}
|
|
11422
|
+
const entryDir = path16.join(namespaceDir, cacheEntry.name);
|
|
11423
|
+
result.scannedEntries += 1;
|
|
11424
|
+
if (!isPathInsideDirectory(cacheRoot, entryDir)) {
|
|
11425
|
+
result.skippedEntries += 1;
|
|
11426
|
+
continue;
|
|
11427
|
+
}
|
|
11428
|
+
const markerPath = path16.join(entryDir, CACHE_MARKER_FILE);
|
|
11429
|
+
const sourceDir = path16.join(entryDir, "source");
|
|
11430
|
+
if (!await isReusableCacheEntry(entryDir, markerPath, sourceDir)) {
|
|
11431
|
+
result.skippedEntries += 1;
|
|
11432
|
+
continue;
|
|
11433
|
+
}
|
|
11434
|
+
let markerText;
|
|
11435
|
+
try {
|
|
11436
|
+
markerText = await fsp9.readFile(markerPath, "utf8");
|
|
11437
|
+
} catch {
|
|
11438
|
+
result.skippedEntries += 1;
|
|
11439
|
+
continue;
|
|
11440
|
+
}
|
|
11441
|
+
const marker = parseCacheMarkerMetadata(markerText);
|
|
11442
|
+
if (!marker) {
|
|
11443
|
+
result.skippedEntries += 1;
|
|
11444
|
+
continue;
|
|
11445
|
+
}
|
|
11446
|
+
if (marker.createdAtMs < expiresBeforeMs) {
|
|
11447
|
+
if (await removeCacheEntryWithinRoot(cacheRoot, entryDir)) {
|
|
11448
|
+
result.prunedEntries += 1;
|
|
11449
|
+
} else {
|
|
11450
|
+
result.skippedEntries += 1;
|
|
11451
|
+
}
|
|
11452
|
+
}
|
|
11453
|
+
}
|
|
11454
|
+
}
|
|
11455
|
+
return result;
|
|
11456
|
+
}
|
|
11333
11457
|
async function findReusableExternalTemplateSourceCache(descriptor) {
|
|
11334
11458
|
if (!isExternalTemplateCacheEnabled()) {
|
|
11335
11459
|
return null;
|
|
@@ -11342,6 +11466,7 @@ async function findReusableExternalTemplateSourceCache(descriptor) {
|
|
|
11342
11466
|
if (!await isPrivateCacheDirectory(cacheRoot) || !await isPrivateCacheDirectory(namespaceDir)) {
|
|
11343
11467
|
return null;
|
|
11344
11468
|
}
|
|
11469
|
+
await pruneExternalTemplateCache();
|
|
11345
11470
|
let entries;
|
|
11346
11471
|
try {
|
|
11347
11472
|
entries = await fsp9.readdir(namespaceDir, { withFileTypes: true });
|
|
@@ -11393,6 +11518,7 @@ async function resolveExternalTemplateSourceCache(descriptor, populateSourceDir)
|
|
|
11393
11518
|
if (!await ensurePrivateCacheDirectory(cacheRoot) || !await ensurePrivateCacheDirectory(namespaceDir)) {
|
|
11394
11519
|
return null;
|
|
11395
11520
|
}
|
|
11521
|
+
await pruneExternalTemplateCache();
|
|
11396
11522
|
if (await isReusableCacheEntry(entryDir, markerPath, sourceDir)) {
|
|
11397
11523
|
return {
|
|
11398
11524
|
cacheHit: true,
|
|
@@ -17323,4 +17449,4 @@ async function resolveOptionalInteractiveExternalLayerId({
|
|
|
17323
17449
|
|
|
17324
17450
|
export { syncPersistenceRestArtifacts, copyInterpolatedDirectory, listInterpolatedDirectoryOutputs, getPrimaryDevelopmentScript, getOptionalOnboardingSteps, getOptionalOnboardingNote, getOptionalOnboardingShortNote, formatNonEmptyTargetDirectoryError, require_semver2 as require_semver, parseTemplateLocator, resolveExternalTemplateLayers, resolveTemplateSeed, normalizeOptionalCliString, resolveLocalCliPathOption, assertExternalLayerCompositionOptions, assertBuiltInTemplateVariantAllowed, parseAlternateRenderTargets, parseCompoundInnerBlocksPreset, OPTIONAL_WORDPRESS_AI_CLIENT_COMPATIBILITY, REQUIRED_WORKSPACE_ABILITY_COMPATIBILITY, resolveScaffoldCompatibilityPolicy, createScaffoldCompatibilityConfig, renderScaffoldCompatibilityConfig, updatePluginHeaderCompatibility, getDefaultAnswers, resolveTemplateId, resolvePackageManagerId, collectScaffoldAnswers, DATA_STORAGE_MODES, PERSISTENCE_POLICIES, isDataStorageMode, isPersistencePolicy, scaffoldProject, resolveOptionalInteractiveExternalLayerId };
|
|
17325
17451
|
|
|
17326
|
-
//# debugId=
|
|
17452
|
+
//# debugId=7E585E3F386D6E1964756E2164756E21
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
hasExecutablePattern,
|
|
4
|
+
hasUncommentedPattern,
|
|
5
|
+
maskTypeScriptCommentsAndLiterals
|
|
6
|
+
} from "./cli-rwjkqjhs.js";
|
|
2
7
|
import {
|
|
3
8
|
getBuiltInTemplateLayerDirs,
|
|
4
9
|
isOmittableBuiltInTemplateLayerDir
|
|
@@ -16,7 +21,7 @@ import {
|
|
|
16
21
|
escapeRegex,
|
|
17
22
|
readWorkspaceInventory,
|
|
18
23
|
resolveEditorPluginSlotAlias
|
|
19
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-j30rk466.js";
|
|
20
25
|
import"./cli-t73q5aqz.js";
|
|
21
26
|
import {
|
|
22
27
|
CLI_DIAGNOSTIC_CODES,
|
|
@@ -30,7 +35,8 @@ import {
|
|
|
30
35
|
getInvalidWorkspaceProjectReason,
|
|
31
36
|
parseWorkspacePackageJson,
|
|
32
37
|
tryResolveWorkspaceProject
|
|
33
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-btbpt84c.js";
|
|
39
|
+
import"./cli-6bhfzq5e.js";
|
|
34
40
|
import"./cli-xnn9xjcy.js";
|
|
35
41
|
|
|
36
42
|
// ../wp-typia-project-tools/src/runtime/cli-doctor-environment.ts
|
|
@@ -324,67 +330,6 @@ var WORKSPACE_BLOCK_LOCAL_STYLE_FILES = [
|
|
|
324
330
|
];
|
|
325
331
|
var WORKSPACE_BLOCK_IFRAME_GLOBAL_DOM_PATTERN = /\b(?:document|window)\b|\b(?:parent|top)\b(?!\s*:)/gu;
|
|
326
332
|
var WORKSPACE_BLOCK_PROPS_PATTERN = /\buse(?:Block|InnerBlocks)Props(?:\.save)?\s*\(/u;
|
|
327
|
-
function maskSourceSegment(segment) {
|
|
328
|
-
return segment.replace(/[^\n\r]/gu, " ");
|
|
329
|
-
}
|
|
330
|
-
function maskTypeScriptComments(source) {
|
|
331
|
-
return source.replace(/\/\*[\s\S]*?\*\//gu, maskSourceSegment).replace(/\/\/[^\n\r]*/gu, maskSourceSegment);
|
|
332
|
-
}
|
|
333
|
-
function maskTypeScriptCommentsAndLiterals(source) {
|
|
334
|
-
let maskedSource = "";
|
|
335
|
-
let index = 0;
|
|
336
|
-
while (index < source.length) {
|
|
337
|
-
const current = source[index];
|
|
338
|
-
const next = source[index + 1];
|
|
339
|
-
if (current === "/" && next === "/") {
|
|
340
|
-
const start = index;
|
|
341
|
-
index += 2;
|
|
342
|
-
while (index < source.length && source[index] !== `
|
|
343
|
-
` && source[index] !== "\r") {
|
|
344
|
-
index += 1;
|
|
345
|
-
}
|
|
346
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
if (current === "/" && next === "*") {
|
|
350
|
-
const start = index;
|
|
351
|
-
index += 2;
|
|
352
|
-
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
353
|
-
index += 1;
|
|
354
|
-
}
|
|
355
|
-
index = Math.min(index + 2, source.length);
|
|
356
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
357
|
-
continue;
|
|
358
|
-
}
|
|
359
|
-
if (current === "'" || current === '"' || current === "`") {
|
|
360
|
-
const start = index;
|
|
361
|
-
const quote = current;
|
|
362
|
-
index += 1;
|
|
363
|
-
while (index < source.length) {
|
|
364
|
-
const char = source[index];
|
|
365
|
-
if (char === "\\") {
|
|
366
|
-
index += 2;
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
index += 1;
|
|
370
|
-
if (char === quote) {
|
|
371
|
-
break;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
375
|
-
continue;
|
|
376
|
-
}
|
|
377
|
-
maskedSource += current;
|
|
378
|
-
index += 1;
|
|
379
|
-
}
|
|
380
|
-
return maskedSource;
|
|
381
|
-
}
|
|
382
|
-
function hasUncommentedPattern(source, pattern) {
|
|
383
|
-
return pattern.test(maskTypeScriptComments(source));
|
|
384
|
-
}
|
|
385
|
-
function hasExecutablePattern(source, pattern) {
|
|
386
|
-
return pattern.test(maskTypeScriptCommentsAndLiterals(source));
|
|
387
|
-
}
|
|
388
333
|
function normalizePathSeparators(relativePath) {
|
|
389
334
|
return relativePath.split(path4.sep).join("/");
|
|
390
335
|
}
|
|
@@ -1172,4 +1117,4 @@ export {
|
|
|
1172
1117
|
getDoctorChecks
|
|
1173
1118
|
};
|
|
1174
1119
|
|
|
1175
|
-
//# debugId=
|
|
1120
|
+
//# debugId=08A020B4B453391764756E2164756E21
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
formatRunScript
|
|
4
|
-
|
|
3
|
+
formatRunScript,
|
|
4
|
+
inferPackageManagerId,
|
|
5
|
+
parsePackageManagerField
|
|
6
|
+
} from "./cli-6bhfzq5e.js";
|
|
5
7
|
import {
|
|
6
8
|
__reExport
|
|
7
9
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -171,16 +173,7 @@ function runProjectScriptIfPresent(projectDir, scriptName) {
|
|
|
171
173
|
}
|
|
172
174
|
function detectPackageManagerId(projectDir) {
|
|
173
175
|
const packageJson = readJson(path.join(projectDir, "package.json"));
|
|
174
|
-
|
|
175
|
-
if (field.startsWith("bun@"))
|
|
176
|
-
return "bun";
|
|
177
|
-
if (field.startsWith("npm@"))
|
|
178
|
-
return "npm";
|
|
179
|
-
if (field.startsWith("pnpm@"))
|
|
180
|
-
return "pnpm";
|
|
181
|
-
if (field.startsWith("yarn@"))
|
|
182
|
-
return "yarn";
|
|
183
|
-
return "bun";
|
|
176
|
+
return parsePackageManagerField(packageJson.packageManager) ?? inferPackageManagerId(projectDir);
|
|
184
177
|
}
|
|
185
178
|
function getLocalTsxBinary(projectDir) {
|
|
186
179
|
const filename = process.platform === "win32" ? "tsx.cmd" : "tsx";
|
|
@@ -1267,4 +1260,4 @@ export default migrationConfig;
|
|
|
1267
1260
|
}
|
|
1268
1261
|
export { isPlainObject, stableJsonStringify, exports_json_utils, getValueAtPath, setValueAtPath, deleteValueAtPath, createFixtureScalarValue, createTransformFixtureValue, readJson, renderPhpValue, copyFile, sanitizeSaveSnapshotSource, sanitizeSnapshotBlockJson, runProjectScriptIfPresent, detectPackageManagerId, getLocalTsxBinary, isInteractiveTerminal, resolveTargetMigrationVersion, assertMigrationVersionLabel, compareMigrationVersionLabels, formatLegacyMigrationWorkspaceResetGuidance, escapeForCode, renderObjectKey, isNumber, parseMigrationConfig, ROOT_PHP_MIGRATION_REGISTRY, SNAPSHOT_DIR, MIGRATION_TODO_PREFIX, ensureAdvancedMigrationProject, discoverMigrationInitLayout, getProjectPaths, getSnapshotRoot, getSnapshotBlockJsonPath, getSnapshotManifestPath, getAvailableSnapshotVersionsForBlock, createMissingBlockSnapshotMessage, getSnapshotSavePath, getGeneratedDirForBlock, getRuleFilePath, getFixtureFilePath, ensureMigrationDirectories, discoverMigrationEntries, assertRuleHasNoTodos, readRuleMetadata, writeInitialMigrationScaffold, assertNoLegacySemverMigrationWorkspace, loadMigrationProject, writeMigrationConfig };
|
|
1269
1262
|
|
|
1270
|
-
//# debugId=
|
|
1263
|
+
//# debugId=D28E1D6B4C0330A964756E2164756E21
|
|
@@ -4,14 +4,7 @@ import {
|
|
|
4
4
|
} from "./cli-1sm60g1z.js";
|
|
5
5
|
import {
|
|
6
6
|
discoverMigrationInitLayout
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import {
|
|
9
|
-
formatAddDevDependenciesCommand,
|
|
10
|
-
formatPackageExecCommand,
|
|
11
|
-
formatRunScript,
|
|
12
|
-
getPackageManager,
|
|
13
|
-
transformPackageManagerText
|
|
14
|
-
} from "./cli-sj5mtyzj.js";
|
|
7
|
+
} from "./cli-hb9vpsev.js";
|
|
15
8
|
import"./cli-tke8twkn.js";
|
|
16
9
|
import {
|
|
17
10
|
quoteTsString,
|
|
@@ -20,7 +13,7 @@ import {
|
|
|
20
13
|
snapshotWorkspaceFiles,
|
|
21
14
|
toPascalCase,
|
|
22
15
|
updateWorkspaceInventorySource
|
|
23
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-j30rk466.js";
|
|
24
17
|
import {
|
|
25
18
|
CLI_DIAGNOSTIC_CODES,
|
|
26
19
|
createCliDiagnosticCodeError
|
|
@@ -28,7 +21,14 @@ import {
|
|
|
28
21
|
import {
|
|
29
22
|
parseWorkspacePackageManagerId,
|
|
30
23
|
tryResolveWorkspaceProject
|
|
31
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-btbpt84c.js";
|
|
25
|
+
import {
|
|
26
|
+
formatAddDevDependenciesCommand,
|
|
27
|
+
formatPackageExecCommand,
|
|
28
|
+
formatRunScript,
|
|
29
|
+
getPackageManager,
|
|
30
|
+
transformPackageManagerText
|
|
31
|
+
} from "./cli-6bhfzq5e.js";
|
|
32
32
|
import {
|
|
33
33
|
__toESM
|
|
34
34
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -841,4 +841,4 @@ export {
|
|
|
841
841
|
applyInitPlan
|
|
842
842
|
};
|
|
843
843
|
|
|
844
|
-
//# debugId=
|
|
844
|
+
//# debugId=E7F537E7B32AAF5464756E2164756E21
|