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,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
getPackageVersions
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-agywa5n6.js";
|
|
5
|
+
import"./cli-qse6myha.js";
|
|
5
6
|
import {
|
|
6
7
|
discoverMigrationInitLayout
|
|
7
8
|
} from "./cli-2rqf6t0b.js";
|
|
8
|
-
import"./cli-qse6myha.js";
|
|
9
9
|
import {
|
|
10
10
|
quoteTsString,
|
|
11
11
|
require_typescript,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
snapshotWorkspaceFiles,
|
|
14
14
|
toPascalCase,
|
|
15
15
|
updateWorkspaceInventorySource
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-ts9thts5.js";
|
|
17
17
|
import"./cli-cvxvcw7c.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-43mx1vfb.js";
|
|
19
19
|
import {
|
|
20
20
|
CLI_DIAGNOSTIC_CODES,
|
|
21
21
|
createCliDiagnosticCodeError
|
|
@@ -717,6 +717,16 @@ function getSyncScriptEnv() {
|
|
|
717
717
|
return env;
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
+
function getOptionalNodeErrorCode( error: unknown ): string | undefined {
|
|
721
|
+
return typeof error === 'object' && error !== null && 'code' in error
|
|
722
|
+
? String( ( error as { code: unknown } ).code )
|
|
723
|
+
: undefined;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function isFileNotFoundError( error: unknown ): boolean {
|
|
727
|
+
return getOptionalNodeErrorCode( error ) === 'ENOENT';
|
|
728
|
+
}
|
|
729
|
+
|
|
720
730
|
function runSyncScript( scriptPath: string, options: SyncCliOptions ) {
|
|
721
731
|
const args = [ scriptPath ];
|
|
722
732
|
if ( options.check ) {
|
|
@@ -731,7 +741,7 @@ function runSyncScript( scriptPath: string, options: SyncCliOptions ) {
|
|
|
731
741
|
} );
|
|
732
742
|
|
|
733
743
|
if ( result.error ) {
|
|
734
|
-
if ( ( result.error
|
|
744
|
+
if ( isFileNotFoundError( result.error ) ) {
|
|
735
745
|
throw new Error(
|
|
736
746
|
'Unable to resolve \`tsx\` for project sync. Install project dependencies or rerun the command through your package manager.'
|
|
737
747
|
);
|
|
@@ -863,4 +873,4 @@ export {
|
|
|
863
873
|
applyInitPlan
|
|
864
874
|
};
|
|
865
875
|
|
|
866
|
-
//# debugId=
|
|
876
|
+
//# debugId=4702A433619DCEF464756E2164756E21
|
|
@@ -83,6 +83,41 @@ function findExecutablePatternMatch(source, patterns) {
|
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
// ../wp-typia-project-tools/src/runtime/cli-add-workspace-admin-view-types.ts
|
|
87
|
+
var ADMIN_VIEW_REST_SOURCE_KIND = "rest-resource";
|
|
88
|
+
var ADMIN_VIEW_CORE_DATA_SOURCE_KIND = "core-data";
|
|
89
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_KIND_IDS = [
|
|
90
|
+
"postType",
|
|
91
|
+
"taxonomy"
|
|
92
|
+
];
|
|
93
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_SEGMENT_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/u;
|
|
94
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/u;
|
|
95
|
+
var ADMIN_VIEW_SOURCE_USAGE = "wp-typia add admin-view <name> --source <rest-resource:slug|core-data:kind/name>";
|
|
96
|
+
var ADMIN_VIEWS_SCRIPT = "build/admin-views/index.js";
|
|
97
|
+
var ADMIN_VIEWS_ASSET = "build/admin-views/index.asset.php";
|
|
98
|
+
var ADMIN_VIEWS_STYLE = "build/admin-views/style-index.css";
|
|
99
|
+
var ADMIN_VIEWS_STYLE_RTL = "build/admin-views/style-index-rtl.css";
|
|
100
|
+
var ADMIN_VIEWS_PHP_GLOB = "/inc/admin-views/*.php";
|
|
101
|
+
var ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN = /(?:^|[^\\])\(/u;
|
|
102
|
+
function isAdminViewCoreDataSource(source) {
|
|
103
|
+
return source?.kind === ADMIN_VIEW_CORE_DATA_SOURCE_KIND;
|
|
104
|
+
}
|
|
105
|
+
function isAdminViewRestResourceSource(source) {
|
|
106
|
+
return source?.kind === ADMIN_VIEW_REST_SOURCE_KIND;
|
|
107
|
+
}
|
|
108
|
+
function isAdminViewManualSettingsRestResource(restResource) {
|
|
109
|
+
return restResource?.mode === "manual" && typeof restResource.bodyTypeName === "string" && restResource.bodyTypeName.trim().length > 0 && typeof restResource.queryTypeName === "string" && restResource.queryTypeName.trim().length > 0 && typeof restResource.responseTypeName === "string" && restResource.responseTypeName.trim().length > 0;
|
|
110
|
+
}
|
|
111
|
+
function hasAdminViewManualSettingsRouteParameters(restResource) {
|
|
112
|
+
return [restResource?.pathPattern, restResource?.routePattern].some((pattern) => typeof pattern === "string" && ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN.test(pattern));
|
|
113
|
+
}
|
|
114
|
+
function formatAdminViewSourceLocator(source) {
|
|
115
|
+
if (isAdminViewCoreDataSource(source)) {
|
|
116
|
+
return `${source.kind}:${source.entityKind}/${source.entityName}`;
|
|
117
|
+
}
|
|
118
|
+
return `${source.kind}:${source.slug}`;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { maskTypeScriptCommentsAndLiterals, hasExecutablePattern, hasUncommentedPattern, findExecutablePatternMatch, ADMIN_VIEW_REST_SOURCE_KIND, ADMIN_VIEW_CORE_DATA_SOURCE_KIND, ADMIN_VIEW_CORE_DATA_ENTITY_KIND_IDS, ADMIN_VIEW_CORE_DATA_ENTITY_SEGMENT_PATTERN, ADMIN_VIEW_CORE_DATA_ENTITY_NAME_PATTERN, ADMIN_VIEW_SOURCE_USAGE, ADMIN_VIEWS_SCRIPT, ADMIN_VIEWS_ASSET, ADMIN_VIEWS_STYLE, ADMIN_VIEWS_STYLE_RTL, ADMIN_VIEWS_PHP_GLOB, isAdminViewCoreDataSource, isAdminViewRestResourceSource, isAdminViewManualSettingsRestResource, hasAdminViewManualSettingsRouteParameters, formatAdminViewSourceLocator };
|
|
87
122
|
|
|
88
|
-
//# debugId=
|
|
123
|
+
//# debugId=E5187560087C2C2F64756E2164756E21
|
|
@@ -20,31 +20,31 @@ import {
|
|
|
20
20
|
resolvePackageManagerId,
|
|
21
21
|
resolveTemplateId,
|
|
22
22
|
scaffoldProject
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import"./cli-arz4rcye.js";
|
|
23
|
+
} from "./cli-1meywwsy.js";
|
|
25
24
|
import"./cli-8reep89s.js";
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-bq2v559b.js";
|
|
29
|
-
import"./cli-xw1wbxf3.js";
|
|
25
|
+
import"./cli-c2acv5dv.js";
|
|
26
|
+
import"./cli-agywa5n6.js";
|
|
30
27
|
import {
|
|
31
28
|
OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
|
|
32
29
|
isBuiltInTemplateId
|
|
33
30
|
} from "./cli-qse6myha.js";
|
|
31
|
+
import"./cli-9npd9was.js";
|
|
32
|
+
import"./cli-2rqf6t0b.js";
|
|
34
33
|
import {
|
|
35
34
|
pathExists
|
|
36
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-ts9thts5.js";
|
|
37
36
|
import"./cli-cvxvcw7c.js";
|
|
38
37
|
import {
|
|
39
38
|
createManagedTempRoot
|
|
40
39
|
} from "./cli-t73q5aqz.js";
|
|
41
|
-
import"./cli-
|
|
40
|
+
import"./cli-43mx1vfb.js";
|
|
42
41
|
import"./cli-p95wr1q8.js";
|
|
43
42
|
import"./cli-hhp1d348.js";
|
|
44
43
|
import {
|
|
45
44
|
formatInstallCommand,
|
|
46
45
|
formatRunScript
|
|
47
46
|
} from "./cli-52ke0ptp.js";
|
|
47
|
+
import"./cli-bq2v559b.js";
|
|
48
48
|
import"./cli-xnn9xjcy.js";
|
|
49
49
|
|
|
50
50
|
// ../wp-typia-project-tools/src/runtime/cli-scaffold.ts
|
|
@@ -561,4 +561,4 @@ export {
|
|
|
561
561
|
getNextSteps
|
|
562
562
|
};
|
|
563
563
|
|
|
564
|
-
//# debugId=
|
|
564
|
+
//# debugId=2B866835B8626C1664756E2164756E21
|