wp-typia 0.22.9 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/bin/routing-metadata.generated.js +16 -0
- package/dist-bunli/.bunli/commands.gen.js +7312 -3829
- package/dist-bunli/{cli-2pnk64h0.js → cli-1meywwsy.js} +148 -124
- package/dist-bunli/{cli-fys8vm2t.js → cli-43mx1vfb.js} +4 -1
- package/dist-bunli/{cli-ag722tzm.js → cli-9npd9was.js} +9 -5
- package/dist-bunli/{cli-add-6dn9h94t.js → cli-add-21bvpfgw.js} +4591 -2319
- package/dist-bunli/{cli-arz4rcye.js → cli-agywa5n6.js} +6 -6
- package/dist-bunli/{cli-xw1wbxf3.js → cli-c2acv5dv.js} +1 -1
- package/dist-bunli/{cli-doctor-564c43ay.js → cli-doctor-wy2yjsge.js} +245 -146
- package/dist-bunli/{cli-init-znhqp8tr.js → cli-init-xnsbxncv.js} +16 -6
- package/dist-bunli/{cli-rwjkqjhs.js → cli-j8et6jvr.js} +37 -2
- package/dist-bunli/{cli-scaffold-6trxyyk6.js → cli-scaffold-zhp2ym8z.js} +9 -9
- package/dist-bunli/{cli-regw5384.js → cli-ts9thts5.js} +1568 -1035
- package/dist-bunli/{cli-y934dq2k.js → cli-z5qkx2pn.js} +197 -100
- package/dist-bunli/cli.js +3 -3
- package/dist-bunli/{command-list-g3qhb3y4.js → command-list-aqrkx021.js} +881 -505
- package/dist-bunli/{migrations-qc1r0yqe.js → migrations-bx0yvc2v.js} +4 -4
- package/dist-bunli/node-cli.js +1173 -693
- package/package.json +2 -2
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
getPackageVersions
|
|
4
|
-
} from "./cli-arz4rcye.js";
|
|
5
2
|
import {
|
|
6
3
|
CREATE_TEMPLATE_SELECTION_HINT,
|
|
7
4
|
parseTemplateLocator,
|
|
8
5
|
require_semver,
|
|
9
6
|
validateExplicitCreateTemplateId
|
|
10
7
|
} from "./cli-8reep89s.js";
|
|
11
|
-
import {
|
|
12
|
-
seedProjectMigrations
|
|
13
|
-
} from "./cli-ag722tzm.js";
|
|
14
|
-
import {
|
|
15
|
-
ensureMigrationDirectories,
|
|
16
|
-
isPlainObject,
|
|
17
|
-
stableJsonStringify,
|
|
18
|
-
writeInitialMigrationScaffold,
|
|
19
|
-
writeMigrationConfig
|
|
20
|
-
} from "./cli-2rqf6t0b.js";
|
|
21
8
|
import {
|
|
22
9
|
getBuiltInSharedTemplateLayerDir,
|
|
23
10
|
getBuiltInTemplateLayerDirs,
|
|
@@ -27,7 +14,10 @@ import {
|
|
|
27
14
|
isOmittableBuiltInTemplateLayerDir,
|
|
28
15
|
resolveBuiltInTemplateSource,
|
|
29
16
|
resolveBuiltInTemplateSourceFromLayerDirs
|
|
30
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-c2acv5dv.js";
|
|
18
|
+
import {
|
|
19
|
+
getPackageVersions
|
|
20
|
+
} from "./cli-agywa5n6.js";
|
|
31
21
|
import {
|
|
32
22
|
BUILTIN_BLOCK_METADATA_VERSION,
|
|
33
23
|
COMPOUND_CHILD_BLOCK_METADATA_DEFAULTS,
|
|
@@ -43,10 +33,21 @@ import {
|
|
|
43
33
|
isBuiltInTemplateId,
|
|
44
34
|
normalizeTemplateLookupId
|
|
45
35
|
} from "./cli-qse6myha.js";
|
|
36
|
+
import {
|
|
37
|
+
seedProjectMigrations
|
|
38
|
+
} from "./cli-9npd9was.js";
|
|
39
|
+
import {
|
|
40
|
+
ensureMigrationDirectories,
|
|
41
|
+
isPlainObject,
|
|
42
|
+
stableJsonStringify,
|
|
43
|
+
writeInitialMigrationScaffold,
|
|
44
|
+
writeMigrationConfig
|
|
45
|
+
} from "./cli-2rqf6t0b.js";
|
|
46
46
|
import {
|
|
47
47
|
buildBlockCssClassName,
|
|
48
48
|
buildFrontendCssClassName,
|
|
49
49
|
getNodeErrorCode,
|
|
50
|
+
getOptionalNodeErrorCode,
|
|
50
51
|
normalizeBlockSlug,
|
|
51
52
|
pathExists,
|
|
52
53
|
readOptionalUtf8File,
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
toTitleCase,
|
|
58
59
|
validateBlockSlug,
|
|
59
60
|
validateNamespace
|
|
60
|
-
} from "./cli-
|
|
61
|
+
} from "./cli-ts9thts5.js";
|
|
61
62
|
import {
|
|
62
63
|
createManagedTempRoot
|
|
63
64
|
} from "./cli-t73q5aqz.js";
|
|
@@ -3061,14 +3062,11 @@ import { createRequire } from "module";
|
|
|
3061
3062
|
import path8 from "path";
|
|
3062
3063
|
var require2 = createRequire(import.meta.url);
|
|
3063
3064
|
var DEFAULT_SCAFFOLD_REPOSITORY_REFERENCE = "imjlk/wp-typia";
|
|
3064
|
-
function getErrorCode(error) {
|
|
3065
|
-
return typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
|
|
3066
|
-
}
|
|
3067
3065
|
function readRepositoryPackageManifest(packageJsonPath) {
|
|
3068
3066
|
try {
|
|
3069
3067
|
return JSON.parse(fs4.readFileSync(packageJsonPath, "utf8"));
|
|
3070
3068
|
} catch (error) {
|
|
3071
|
-
if (
|
|
3069
|
+
if (getOptionalNodeErrorCode(error) === "ENOENT") {
|
|
3072
3070
|
return null;
|
|
3073
3071
|
}
|
|
3074
3072
|
throw error;
|
|
@@ -3078,7 +3076,7 @@ function resolveInstalledPackageManifestPath(packageName) {
|
|
|
3078
3076
|
try {
|
|
3079
3077
|
return require2.resolve(`${packageName}/package.json`);
|
|
3080
3078
|
} catch (error) {
|
|
3081
|
-
if (
|
|
3079
|
+
if (getOptionalNodeErrorCode(error) === "MODULE_NOT_FOUND") {
|
|
3082
3080
|
return null;
|
|
3083
3081
|
}
|
|
3084
3082
|
throw error;
|
|
@@ -7479,6 +7477,122 @@ import { createHash, randomUUID } from "crypto";
|
|
|
7479
7477
|
import { promises as fsp10 } from "fs";
|
|
7480
7478
|
import path15 from "path";
|
|
7481
7479
|
|
|
7480
|
+
// ../wp-typia-project-tools/src/runtime/template-source-cache-markers.ts
|
|
7481
|
+
var CACHE_MARKER_FILE = "wp-typia-template-cache.json";
|
|
7482
|
+
var CACHE_PRUNE_MARKER_FILE = "wp-typia-template-cache-prune.json";
|
|
7483
|
+
var REDACTED_CACHE_METADATA_VALUE = "[redacted]";
|
|
7484
|
+
var URL_LIKE_METADATA_KEY = /(url|uri|registry|tarball)/iu;
|
|
7485
|
+
function sanitizeExternalTemplateCacheMetadataValue(key, value) {
|
|
7486
|
+
if (!URL_LIKE_METADATA_KEY.test(key)) {
|
|
7487
|
+
return value;
|
|
7488
|
+
}
|
|
7489
|
+
try {
|
|
7490
|
+
const url = new URL(value);
|
|
7491
|
+
url.username = "";
|
|
7492
|
+
url.password = "";
|
|
7493
|
+
url.search = "";
|
|
7494
|
+
url.hash = "";
|
|
7495
|
+
return url.toString();
|
|
7496
|
+
} catch {
|
|
7497
|
+
return REDACTED_CACHE_METADATA_VALUE;
|
|
7498
|
+
}
|
|
7499
|
+
}
|
|
7500
|
+
function sanitizeExternalTemplateCacheMetadata(metadata) {
|
|
7501
|
+
return Object.fromEntries(Object.entries(metadata).map(([key, value]) => [
|
|
7502
|
+
key,
|
|
7503
|
+
value === null ? null : sanitizeExternalTemplateCacheMetadataValue(key, value)
|
|
7504
|
+
]));
|
|
7505
|
+
}
|
|
7506
|
+
function parseExternalTemplateCacheEntryMarker(markerText) {
|
|
7507
|
+
let marker;
|
|
7508
|
+
try {
|
|
7509
|
+
marker = JSON.parse(markerText);
|
|
7510
|
+
} catch {
|
|
7511
|
+
return null;
|
|
7512
|
+
}
|
|
7513
|
+
if (typeof marker !== "object" || marker === null || Array.isArray(marker)) {
|
|
7514
|
+
return null;
|
|
7515
|
+
}
|
|
7516
|
+
const rawMetadata = marker.metadata;
|
|
7517
|
+
if (typeof rawMetadata !== "object" || rawMetadata === null || Array.isArray(rawMetadata)) {
|
|
7518
|
+
return null;
|
|
7519
|
+
}
|
|
7520
|
+
const metadata = {};
|
|
7521
|
+
for (const [key, value] of Object.entries(rawMetadata)) {
|
|
7522
|
+
if (typeof value !== "string" && value !== null) {
|
|
7523
|
+
return null;
|
|
7524
|
+
}
|
|
7525
|
+
metadata[key] = value;
|
|
7526
|
+
}
|
|
7527
|
+
const rawCreatedAt = marker.createdAt;
|
|
7528
|
+
const createdAtMs = typeof rawCreatedAt === "string" ? Date.parse(rawCreatedAt) : 0;
|
|
7529
|
+
return {
|
|
7530
|
+
createdAtMs: Number.isFinite(createdAtMs) ? createdAtMs : 0,
|
|
7531
|
+
metadata
|
|
7532
|
+
};
|
|
7533
|
+
}
|
|
7534
|
+
function externalTemplateCacheMetadataMatches(actual, expected) {
|
|
7535
|
+
return Object.entries(expected).every(([key, value]) => actual[key] === value);
|
|
7536
|
+
}
|
|
7537
|
+
function isExternalTemplateCacheEntryFreshForTtl(createdAtMs, nowMs, ttlMs) {
|
|
7538
|
+
return ttlMs === null || createdAtMs >= nowMs - ttlMs;
|
|
7539
|
+
}
|
|
7540
|
+
function parseExternalTemplateCachePruneMarker(markerText) {
|
|
7541
|
+
let marker;
|
|
7542
|
+
try {
|
|
7543
|
+
marker = JSON.parse(markerText);
|
|
7544
|
+
} catch {
|
|
7545
|
+
return null;
|
|
7546
|
+
}
|
|
7547
|
+
if (typeof marker !== "object" || marker === null || Array.isArray(marker)) {
|
|
7548
|
+
return null;
|
|
7549
|
+
}
|
|
7550
|
+
const rawPrunedAt = marker.prunedAt;
|
|
7551
|
+
const prunedAtMs = typeof rawPrunedAt === "string" ? Date.parse(rawPrunedAt) : Number.NaN;
|
|
7552
|
+
const rawPruneIntervalMs = marker.pruneIntervalMs;
|
|
7553
|
+
const rawTtlMs = marker.ttlMs;
|
|
7554
|
+
if (typeof rawTtlMs !== "number" || !Number.isFinite(rawTtlMs)) {
|
|
7555
|
+
return null;
|
|
7556
|
+
}
|
|
7557
|
+
if (!Number.isFinite(prunedAtMs)) {
|
|
7558
|
+
return null;
|
|
7559
|
+
}
|
|
7560
|
+
if (rawPruneIntervalMs !== null && (typeof rawPruneIntervalMs !== "number" || !Number.isFinite(rawPruneIntervalMs))) {
|
|
7561
|
+
return null;
|
|
7562
|
+
}
|
|
7563
|
+
return {
|
|
7564
|
+
prunedAtMs,
|
|
7565
|
+
pruneIntervalMs: rawPruneIntervalMs ?? null,
|
|
7566
|
+
ttlMs: rawTtlMs
|
|
7567
|
+
};
|
|
7568
|
+
}
|
|
7569
|
+
function formatExternalTemplateCacheEntryMarker({
|
|
7570
|
+
cacheKey,
|
|
7571
|
+
createdAt,
|
|
7572
|
+
metadata,
|
|
7573
|
+
namespace
|
|
7574
|
+
}) {
|
|
7575
|
+
return `${JSON.stringify({
|
|
7576
|
+
createdAt: createdAt.toISOString(),
|
|
7577
|
+
key: cacheKey,
|
|
7578
|
+
metadata: sanitizeExternalTemplateCacheMetadata(metadata),
|
|
7579
|
+
namespace
|
|
7580
|
+
}, null, 2)}
|
|
7581
|
+
`;
|
|
7582
|
+
}
|
|
7583
|
+
function formatExternalTemplateCachePruneMarker({
|
|
7584
|
+
nowMs,
|
|
7585
|
+
pruneIntervalMs,
|
|
7586
|
+
ttlMs
|
|
7587
|
+
}) {
|
|
7588
|
+
return `${JSON.stringify({
|
|
7589
|
+
prunedAt: new Date(nowMs).toISOString(),
|
|
7590
|
+
pruneIntervalMs,
|
|
7591
|
+
ttlMs
|
|
7592
|
+
}, null, 2)}
|
|
7593
|
+
`;
|
|
7594
|
+
}
|
|
7595
|
+
|
|
7482
7596
|
// ../wp-typia-project-tools/src/runtime/template-source-cache-policy.ts
|
|
7483
7597
|
import os2 from "os";
|
|
7484
7598
|
import path14 from "path";
|
|
@@ -7560,10 +7674,7 @@ function getCurrentUserCacheSegment() {
|
|
|
7560
7674
|
}
|
|
7561
7675
|
|
|
7562
7676
|
// ../wp-typia-project-tools/src/runtime/template-source-cache.ts
|
|
7563
|
-
var CACHE_MARKER_FILE = "wp-typia-template-cache.json";
|
|
7564
|
-
var CACHE_PRUNE_MARKER_FILE = "wp-typia-template-cache-prune.json";
|
|
7565
7677
|
var PRIVATE_CACHE_DIRECTORY_MODE = 448;
|
|
7566
|
-
var REDACTED_CACHE_METADATA_VALUE = "[redacted]";
|
|
7567
7678
|
var CACHE_PUBLISH_RACE_ERROR_CODES = new Set(["EEXIST", "ENOTEMPTY"]);
|
|
7568
7679
|
var CACHE_UNAVAILABLE_ERROR_CODES = new Set([
|
|
7569
7680
|
"EACCES",
|
|
@@ -7572,7 +7683,6 @@ var CACHE_UNAVAILABLE_ERROR_CODES = new Set([
|
|
|
7572
7683
|
"EPERM",
|
|
7573
7684
|
"EROFS"
|
|
7574
7685
|
]);
|
|
7575
|
-
var URL_LIKE_METADATA_KEY = /(url|uri|registry|tarball)/iu;
|
|
7576
7686
|
var SAFE_CACHE_NAMESPACE_SEGMENT = /^[A-Za-z0-9_.-]+$/u;
|
|
7577
7687
|
var SAFE_CACHE_ENTRY_SEGMENT = /^[a-f0-9]{64}$/u;
|
|
7578
7688
|
function createTemporaryCacheEntryDirName(cacheKey) {
|
|
@@ -7639,27 +7749,6 @@ async function ensurePrivateCacheDirectory(directory) {
|
|
|
7639
7749
|
return false;
|
|
7640
7750
|
}
|
|
7641
7751
|
}
|
|
7642
|
-
function sanitizeCacheMetadataValue(key, value) {
|
|
7643
|
-
if (!URL_LIKE_METADATA_KEY.test(key)) {
|
|
7644
|
-
return value;
|
|
7645
|
-
}
|
|
7646
|
-
try {
|
|
7647
|
-
const url = new URL(value);
|
|
7648
|
-
url.username = "";
|
|
7649
|
-
url.password = "";
|
|
7650
|
-
url.search = "";
|
|
7651
|
-
url.hash = "";
|
|
7652
|
-
return url.toString();
|
|
7653
|
-
} catch {
|
|
7654
|
-
return REDACTED_CACHE_METADATA_VALUE;
|
|
7655
|
-
}
|
|
7656
|
-
}
|
|
7657
|
-
function sanitizeCacheMetadata(metadata) {
|
|
7658
|
-
return Object.fromEntries(Object.entries(metadata).map(([key, value]) => [
|
|
7659
|
-
key,
|
|
7660
|
-
value === null ? null : sanitizeCacheMetadataValue(key, value)
|
|
7661
|
-
]));
|
|
7662
|
-
}
|
|
7663
7752
|
function resolveCacheNamespaceDir(cacheRoot, namespace) {
|
|
7664
7753
|
if (namespace === "." || namespace === ".." || !SAFE_CACHE_NAMESPACE_SEGMENT.test(namespace)) {
|
|
7665
7754
|
return null;
|
|
@@ -7691,47 +7780,13 @@ function getCacheEntryPaths(descriptor) {
|
|
|
7691
7780
|
async function isReusableCacheEntry(entryDir, markerPath, sourceDir) {
|
|
7692
7781
|
return await isPrivateCacheDirectory(entryDir) && await pathExists(markerPath) && await isDirectoryPath(sourceDir);
|
|
7693
7782
|
}
|
|
7694
|
-
function parseCacheMarkerMetadata(markerText) {
|
|
7695
|
-
let marker;
|
|
7696
|
-
try {
|
|
7697
|
-
marker = JSON.parse(markerText);
|
|
7698
|
-
} catch {
|
|
7699
|
-
return null;
|
|
7700
|
-
}
|
|
7701
|
-
if (typeof marker !== "object" || marker === null || Array.isArray(marker)) {
|
|
7702
|
-
return null;
|
|
7703
|
-
}
|
|
7704
|
-
const rawMetadata = marker.metadata;
|
|
7705
|
-
if (typeof rawMetadata !== "object" || rawMetadata === null || Array.isArray(rawMetadata)) {
|
|
7706
|
-
return null;
|
|
7707
|
-
}
|
|
7708
|
-
const metadata = {};
|
|
7709
|
-
for (const [key, value] of Object.entries(rawMetadata)) {
|
|
7710
|
-
if (typeof value !== "string" && value !== null) {
|
|
7711
|
-
return null;
|
|
7712
|
-
}
|
|
7713
|
-
metadata[key] = value;
|
|
7714
|
-
}
|
|
7715
|
-
const rawCreatedAt = marker.createdAt;
|
|
7716
|
-
const createdAtMs = typeof rawCreatedAt === "string" ? Date.parse(rawCreatedAt) : 0;
|
|
7717
|
-
return {
|
|
7718
|
-
createdAtMs: Number.isFinite(createdAtMs) ? createdAtMs : 0,
|
|
7719
|
-
metadata
|
|
7720
|
-
};
|
|
7721
|
-
}
|
|
7722
7783
|
async function readCacheEntryMarker(markerPath) {
|
|
7723
7784
|
try {
|
|
7724
|
-
return
|
|
7785
|
+
return parseExternalTemplateCacheEntryMarker(await fsp10.readFile(markerPath, "utf8"));
|
|
7725
7786
|
} catch {
|
|
7726
7787
|
return null;
|
|
7727
7788
|
}
|
|
7728
7789
|
}
|
|
7729
|
-
function cacheMetadataMatches(actual, expected) {
|
|
7730
|
-
return Object.entries(expected).every(([key, value]) => actual[key] === value);
|
|
7731
|
-
}
|
|
7732
|
-
function isCacheEntryFreshForTtl(createdAtMs, nowMs, ttlMs) {
|
|
7733
|
-
return ttlMs === null || createdAtMs >= nowMs - ttlMs;
|
|
7734
|
-
}
|
|
7735
7790
|
async function getReusableCacheEntryMarker(entryDir, markerPath, sourceDir) {
|
|
7736
7791
|
if (!await isReusableCacheEntry(entryDir, markerPath, sourceDir)) {
|
|
7737
7792
|
return null;
|
|
@@ -7740,7 +7795,7 @@ async function getReusableCacheEntryMarker(entryDir, markerPath, sourceDir) {
|
|
|
7740
7795
|
}
|
|
7741
7796
|
async function isReusableFreshCacheEntry(entryDir, markerPath, sourceDir, nowMs, ttlMs) {
|
|
7742
7797
|
const marker = await getReusableCacheEntryMarker(entryDir, markerPath, sourceDir);
|
|
7743
|
-
return marker !== null &&
|
|
7798
|
+
return marker !== null && isExternalTemplateCacheEntryFreshForTtl(marker.createdAtMs, nowMs, ttlMs);
|
|
7744
7799
|
}
|
|
7745
7800
|
function isPathInsideDirectory(directory, candidatePath) {
|
|
7746
7801
|
const relativePath = path15.relative(directory, candidatePath);
|
|
@@ -7760,35 +7815,6 @@ async function removeCacheEntryWithinRoot(cacheRoot, entryDir) {
|
|
|
7760
7815
|
function getCachePruneMarkerPath(cacheRoot) {
|
|
7761
7816
|
return path15.join(cacheRoot, CACHE_PRUNE_MARKER_FILE);
|
|
7762
7817
|
}
|
|
7763
|
-
function parseCachePruneMarker(markerText) {
|
|
7764
|
-
let marker;
|
|
7765
|
-
try {
|
|
7766
|
-
marker = JSON.parse(markerText);
|
|
7767
|
-
} catch {
|
|
7768
|
-
return null;
|
|
7769
|
-
}
|
|
7770
|
-
if (typeof marker !== "object" || marker === null || Array.isArray(marker)) {
|
|
7771
|
-
return null;
|
|
7772
|
-
}
|
|
7773
|
-
const rawPrunedAt = marker.prunedAt;
|
|
7774
|
-
const prunedAtMs = typeof rawPrunedAt === "string" ? Date.parse(rawPrunedAt) : Number.NaN;
|
|
7775
|
-
const rawPruneIntervalMs = marker.pruneIntervalMs;
|
|
7776
|
-
const rawTtlMs = marker.ttlMs;
|
|
7777
|
-
if (typeof rawTtlMs !== "number" || !Number.isFinite(rawTtlMs)) {
|
|
7778
|
-
return null;
|
|
7779
|
-
}
|
|
7780
|
-
if (!Number.isFinite(prunedAtMs)) {
|
|
7781
|
-
return null;
|
|
7782
|
-
}
|
|
7783
|
-
if (rawPruneIntervalMs !== null && (typeof rawPruneIntervalMs !== "number" || !Number.isFinite(rawPruneIntervalMs))) {
|
|
7784
|
-
return null;
|
|
7785
|
-
}
|
|
7786
|
-
return {
|
|
7787
|
-
prunedAtMs,
|
|
7788
|
-
pruneIntervalMs: rawPruneIntervalMs ?? null,
|
|
7789
|
-
ttlMs: rawTtlMs
|
|
7790
|
-
};
|
|
7791
|
-
}
|
|
7792
7818
|
async function shouldSkipExternalTemplateCachePrune({
|
|
7793
7819
|
cacheRoot,
|
|
7794
7820
|
force,
|
|
@@ -7805,7 +7831,7 @@ async function shouldSkipExternalTemplateCachePrune({
|
|
|
7805
7831
|
} catch {
|
|
7806
7832
|
return false;
|
|
7807
7833
|
}
|
|
7808
|
-
const marker =
|
|
7834
|
+
const marker = parseExternalTemplateCachePruneMarker(markerText);
|
|
7809
7835
|
if (!marker || marker.ttlMs !== ttlMs || marker.pruneIntervalMs !== pruneIntervalMs) {
|
|
7810
7836
|
return false;
|
|
7811
7837
|
}
|
|
@@ -7819,12 +7845,11 @@ async function writeExternalTemplateCachePruneMarker({
|
|
|
7819
7845
|
ttlMs
|
|
7820
7846
|
}) {
|
|
7821
7847
|
try {
|
|
7822
|
-
await fsp10.writeFile(getCachePruneMarkerPath(cacheRoot),
|
|
7823
|
-
|
|
7848
|
+
await fsp10.writeFile(getCachePruneMarkerPath(cacheRoot), formatExternalTemplateCachePruneMarker({
|
|
7849
|
+
nowMs,
|
|
7824
7850
|
pruneIntervalMs,
|
|
7825
7851
|
ttlMs
|
|
7826
|
-
},
|
|
7827
|
-
`, "utf8");
|
|
7852
|
+
}), "utf8");
|
|
7828
7853
|
} catch {}
|
|
7829
7854
|
}
|
|
7830
7855
|
async function pruneExternalTemplateCache(options = {}) {
|
|
@@ -7951,7 +7976,7 @@ async function findReusableExternalTemplateSourceCache(descriptor) {
|
|
|
7951
7976
|
const markerPath = path15.join(entryDir, CACHE_MARKER_FILE);
|
|
7952
7977
|
const sourceDir = path15.join(entryDir, "source");
|
|
7953
7978
|
const marker = await getReusableCacheEntryMarker(entryDir, markerPath, sourceDir);
|
|
7954
|
-
if (!marker || !
|
|
7979
|
+
if (!marker || !isExternalTemplateCacheEntryFreshForTtl(marker.createdAtMs, nowMs, ttlMs) || !externalTemplateCacheMetadataMatches(marker.metadata, descriptor.metadata)) {
|
|
7955
7980
|
continue;
|
|
7956
7981
|
}
|
|
7957
7982
|
if (!bestEntry || marker.createdAtMs > bestEntry.createdAtMs) {
|
|
@@ -7982,7 +8007,7 @@ async function resolveExternalTemplateSourceCache(descriptor, populateSourceDir)
|
|
|
7982
8007
|
const nowMs = getExternalTemplateCacheNowMs(undefined);
|
|
7983
8008
|
await pruneExternalTemplateCache();
|
|
7984
8009
|
const existingMarker = await getReusableCacheEntryMarker(entryDir, markerPath, sourceDir);
|
|
7985
|
-
if (existingMarker &&
|
|
8010
|
+
if (existingMarker && isExternalTemplateCacheEntryFreshForTtl(existingMarker.createdAtMs, nowMs, ttlMs)) {
|
|
7986
8011
|
return {
|
|
7987
8012
|
cacheHit: true,
|
|
7988
8013
|
sourceDir
|
|
@@ -8008,13 +8033,12 @@ async function resolveExternalTemplateSourceCache(descriptor, populateSourceDir)
|
|
|
8008
8033
|
populateFailed = true;
|
|
8009
8034
|
throw error;
|
|
8010
8035
|
}
|
|
8011
|
-
await fsp10.writeFile(path15.join(temporaryEntryDir, CACHE_MARKER_FILE),
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
metadata:
|
|
8036
|
+
await fsp10.writeFile(path15.join(temporaryEntryDir, CACHE_MARKER_FILE), formatExternalTemplateCacheEntryMarker({
|
|
8037
|
+
cacheKey,
|
|
8038
|
+
createdAt: new Date,
|
|
8039
|
+
metadata: descriptor.metadata,
|
|
8015
8040
|
namespace: descriptor.namespace
|
|
8016
|
-
},
|
|
8017
|
-
`, "utf8");
|
|
8041
|
+
}), "utf8");
|
|
8018
8042
|
await fsp10.rename(temporaryEntryDir, entryDir);
|
|
8019
8043
|
return {
|
|
8020
8044
|
cacheHit: false,
|
|
@@ -14014,4 +14038,4 @@ async function resolveOptionalInteractiveExternalLayerId({
|
|
|
14014
14038
|
|
|
14015
14039
|
export { syncPersistenceRestArtifacts, copyInterpolatedDirectory, listInterpolatedDirectoryOutputs, getPrimaryDevelopmentScript, getOptionalOnboardingSteps, getOptionalOnboardingNote, getOptionalOnboardingShortNote, isCompoundPersistenceEnabled, formatNonEmptyTargetDirectoryError, 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 };
|
|
14016
14040
|
|
|
14017
|
-
//# debugId=
|
|
14041
|
+
//# debugId=9368065E49298D9E64756E2164756E21
|
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
var ADD_KIND_IDS = [
|
|
4
4
|
"admin-view",
|
|
5
5
|
"block",
|
|
6
|
+
"integration-env",
|
|
6
7
|
"variation",
|
|
7
8
|
"style",
|
|
8
9
|
"transform",
|
|
9
10
|
"pattern",
|
|
10
11
|
"binding-source",
|
|
12
|
+
"contract",
|
|
11
13
|
"rest-resource",
|
|
14
|
+
"post-meta",
|
|
12
15
|
"ability",
|
|
13
16
|
"ai-feature",
|
|
14
17
|
"hooked-block",
|
|
@@ -17,4 +20,4 @@ var ADD_KIND_IDS = [
|
|
|
17
20
|
|
|
18
21
|
export { ADD_KIND_IDS };
|
|
19
22
|
|
|
20
|
-
//# debugId=
|
|
23
|
+
//# debugId=C480D575E839E69A64756E2164756E21
|
|
@@ -46,12 +46,9 @@ import {
|
|
|
46
46
|
writeInitialMigrationScaffold,
|
|
47
47
|
writeMigrationConfig
|
|
48
48
|
} from "./cli-2rqf6t0b.js";
|
|
49
|
-
import {
|
|
50
|
-
createReadlinePrompt
|
|
51
|
-
} from "./cli-bq2v559b.js";
|
|
52
49
|
import {
|
|
53
50
|
readWorkspaceInventory
|
|
54
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-ts9thts5.js";
|
|
55
52
|
import {
|
|
56
53
|
getInvalidWorkspaceProjectReason,
|
|
57
54
|
tryResolveWorkspaceProject
|
|
@@ -59,6 +56,9 @@ import {
|
|
|
59
56
|
import {
|
|
60
57
|
formatRunScript
|
|
61
58
|
} from "./cli-52ke0ptp.js";
|
|
59
|
+
import {
|
|
60
|
+
createReadlinePrompt
|
|
61
|
+
} from "./cli-bq2v559b.js";
|
|
62
62
|
|
|
63
63
|
// ../wp-typia-project-tools/src/runtime/migrations.ts
|
|
64
64
|
import fs8 from "fs";
|
|
@@ -1383,6 +1383,10 @@ function renderPhpMigrationRegistryFile(state, entries) {
|
|
|
1383
1383
|
return `<?php
|
|
1384
1384
|
declare(strict_types=1);
|
|
1385
1385
|
|
|
1386
|
+
if ( ! defined( 'ABSPATH' ) ) {
|
|
1387
|
+
exit;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1386
1390
|
/**
|
|
1387
1391
|
* Generated from advanced migration snapshots. Do not edit manually.
|
|
1388
1392
|
*/
|
|
@@ -2603,4 +2607,4 @@ function seedProjectMigrations(projectDir, currentMigrationVersion, blocks, { re
|
|
|
2603
2607
|
|
|
2604
2608
|
export { formatMigrationHelpText, parseMigrationArgs, formatDiffReport, verifyProjectMigrations, doctorProjectMigrations, fixturesProjectMigrations, fuzzProjectMigrations, runMigrationCommand, planProjectMigrations, wizardProjectMigrations, initProjectMigrations, snapshotProjectVersion, diffProjectMigrations, scaffoldProjectMigrations, seedProjectMigrations };
|
|
2605
2609
|
|
|
2606
|
-
//# debugId=
|
|
2610
|
+
//# debugId=3FFBD2D8A6265FAC64756E2164756E21
|