create-ampless 1.0.0-alpha.80 → 1.0.0-alpha.81
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/index.js +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1930,10 +1930,18 @@ function isProtected(relPath) {
|
|
|
1930
1930
|
if (SEED_IF_MISSING_PATTERN.test(relPath)) return false;
|
|
1931
1931
|
return PROTECTED_PATTERNS.some((re) => re.test(relPath));
|
|
1932
1932
|
}
|
|
1933
|
+
var NON_THEME_TEMPLATE_PREFIXES = ["plugin-"];
|
|
1934
|
+
function isThemeDirName(name) {
|
|
1935
|
+
if (name === "_shared") return false;
|
|
1936
|
+
for (const prefix of NON_THEME_TEMPLATE_PREFIXES) {
|
|
1937
|
+
if (name.startsWith(prefix)) return false;
|
|
1938
|
+
}
|
|
1939
|
+
return true;
|
|
1940
|
+
}
|
|
1933
1941
|
async function listShippedThemes(templatesRoot) {
|
|
1934
1942
|
if (!existsSync5(templatesRoot)) return [];
|
|
1935
1943
|
const entries = await readdir3(templatesRoot, { withFileTypes: true });
|
|
1936
|
-
return entries.filter((e) => e.isDirectory() && e.name
|
|
1944
|
+
return entries.filter((e) => e.isDirectory() && isThemeDirName(e.name)).map((e) => e.name).sort();
|
|
1937
1945
|
}
|
|
1938
1946
|
var USER_OWNED_THEME_FILES = /* @__PURE__ */ new Set(["README.md", ".gitignore"]);
|
|
1939
1947
|
function isUserOwnedThemeFile(path) {
|