@modern-js/generator-utils 3.1.38-alpha.0 → 3.1.39
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/cjs/index.js +1 -12
- package/dist/esm/index.js +1 -9
- package/dist/types/index.d.ts +0 -2
- package/package.json +6 -6
- package/CHANGELOG.md +0 -1395
package/dist/cjs/index.js
CHANGED
|
@@ -79,9 +79,6 @@ _export(exports, {
|
|
|
79
79
|
getMWAProjectPath: function() {
|
|
80
80
|
return getMWAProjectPath;
|
|
81
81
|
},
|
|
82
|
-
getDocProjectPath: function() {
|
|
83
|
-
return getDocProjectPath;
|
|
84
|
-
},
|
|
85
82
|
getModernConfigFile: function() {
|
|
86
83
|
return getModernConfigFile;
|
|
87
84
|
}
|
|
@@ -197,12 +194,10 @@ function validatePackageName(value, packages, options) {
|
|
|
197
194
|
};
|
|
198
195
|
}
|
|
199
196
|
function validatePackagePath(value, projectDir, options) {
|
|
200
|
-
const { isMwa, isPublic, isTest
|
|
197
|
+
const { isMwa, isPublic, isTest } = options || {};
|
|
201
198
|
let dir = "apps";
|
|
202
199
|
if (isMwa && isTest) {
|
|
203
200
|
dir = "examples";
|
|
204
|
-
} else if (isDoc) {
|
|
205
|
-
dir = "website";
|
|
206
201
|
} else {
|
|
207
202
|
dir = isPublic ? "packages" : "features";
|
|
208
203
|
}
|
|
@@ -234,12 +229,6 @@ function getMWAProjectPath(packagePath, isMonorepoSubProject, isTest = false) {
|
|
|
234
229
|
}
|
|
235
230
|
return "";
|
|
236
231
|
}
|
|
237
|
-
function getDocProjectPath(packagePath, isMonorepoSubProject) {
|
|
238
|
-
if (isMonorepoSubProject && packagePath) {
|
|
239
|
-
return `website/${packagePath}/`;
|
|
240
|
-
}
|
|
241
|
-
return "";
|
|
242
|
-
}
|
|
243
232
|
async function getModernConfigFile(appDir) {
|
|
244
233
|
let exist = await (0, _fsExist.fileExist)(_path.default.join(appDir, "modern.config.ts"));
|
|
245
234
|
if (exist) {
|
package/dist/esm/index.js
CHANGED
|
@@ -109,12 +109,10 @@ export function validatePackageName(value, packages, options) {
|
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
export function validatePackagePath(value, projectDir, options) {
|
|
112
|
-
const { isMwa, isPublic, isTest
|
|
112
|
+
const { isMwa, isPublic, isTest } = options || {};
|
|
113
113
|
let dir = "apps";
|
|
114
114
|
if (isMwa && isTest) {
|
|
115
115
|
dir = "examples";
|
|
116
|
-
} else if (isDoc) {
|
|
117
|
-
dir = "website";
|
|
118
116
|
} else {
|
|
119
117
|
dir = isPublic ? "packages" : "features";
|
|
120
118
|
}
|
|
@@ -146,12 +144,6 @@ export function getMWAProjectPath(packagePath, isMonorepoSubProject, isTest = fa
|
|
|
146
144
|
}
|
|
147
145
|
return "";
|
|
148
146
|
}
|
|
149
|
-
export function getDocProjectPath(packagePath, isMonorepoSubProject) {
|
|
150
|
-
if (isMonorepoSubProject && packagePath) {
|
|
151
|
-
return `website/${packagePath}/`;
|
|
152
|
-
}
|
|
153
|
-
return "";
|
|
154
|
-
}
|
|
155
147
|
export async function getModernConfigFile(appDir) {
|
|
156
148
|
let exist = await fileExist(path.join(appDir, "modern.config.ts"));
|
|
157
149
|
if (exist) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export declare function validatePackagePath(value: string, projectDir: string, o
|
|
|
27
27
|
isMwa?: boolean;
|
|
28
28
|
isPublic?: boolean;
|
|
29
29
|
isTest?: boolean;
|
|
30
|
-
isDoc?: boolean;
|
|
31
30
|
}): {
|
|
32
31
|
success: boolean;
|
|
33
32
|
error: string;
|
|
@@ -37,5 +36,4 @@ export declare function validatePackagePath(value: string, projectDir: string, o
|
|
|
37
36
|
};
|
|
38
37
|
export declare function getModuleProjectPath(packagePath: string, isMonorepoSubProject: boolean, isPublic: boolean, isLocalPackages: boolean): string;
|
|
39
38
|
export declare function getMWAProjectPath(packagePath: string, isMonorepoSubProject: boolean, isTest?: boolean): string;
|
|
40
|
-
export declare function getDocProjectPath(packagePath: string, isMonorepoSubProject: boolean): string;
|
|
41
39
|
export declare function getModernConfigFile(appDir: string): Promise<"modern.config.ts" | "modern.config.js">;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.39",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@swc/helpers": "0.5.1",
|
|
34
|
-
"@modern-js/plugin-i18n": "2.
|
|
35
|
-
"@modern-js/generator-common": "3.1.
|
|
36
|
-
"@modern-js/utils": "2.
|
|
34
|
+
"@modern-js/plugin-i18n": "2.33.1",
|
|
35
|
+
"@modern-js/generator-common": "3.1.39",
|
|
36
|
+
"@modern-js/utils": "2.33.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@modern-js/codesmith": "2.2.5",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@types/node": "^14",
|
|
42
42
|
"jest": "^29",
|
|
43
43
|
"typescript": "^5",
|
|
44
|
-
"@scripts/build": "2.
|
|
45
|
-
"@scripts/jest-config": "2.
|
|
44
|
+
"@scripts/build": "2.33.1",
|
|
45
|
+
"@scripts/jest-config": "2.33.1"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"publishConfig": {
|