@theholocron/cli 3.18.0 → 3.18.2
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/cli.mjs +11 -3
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1089,8 +1089,6 @@ async function runNew(input) {
|
|
|
1089
1089
|
print(` Patching files…`);
|
|
1090
1090
|
const variants = deriveVariants(templateSlug, input.name);
|
|
1091
1091
|
variants.unshift([`theholocron/${templateSlug}`, `${org}/${input.name}`]);
|
|
1092
|
-
const displayName = input.name.split("-").map(cap).join(" ");
|
|
1093
|
-
variants.push(["<display_name>", displayName]);
|
|
1094
1092
|
const filesPatched = patchFiles(repoDir, variants, input.description, input.homepage, input.runtimeEnvironment, print, readFn, writeFn, walkFn);
|
|
1095
1093
|
print(` ${filesPatched.length} file${filesPatched.length === 1 ? "" : "s"} patched`);
|
|
1096
1094
|
if (input.description !== void 0 || input.homepage !== void 0) try {
|
|
@@ -1100,6 +1098,16 @@ async function runNew(input) {
|
|
|
1100
1098
|
writeFn(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
1101
1099
|
print(` ✓ package.json (description/homepage)`);
|
|
1102
1100
|
} catch {}
|
|
1101
|
+
const displayName = input.name.split("-").map(cap).join(" ");
|
|
1102
|
+
const rootTsconfigPath = path.join(repoDir, "tsconfig.json");
|
|
1103
|
+
try {
|
|
1104
|
+
const tsconfig = JSON.parse(readFn(rootTsconfigPath));
|
|
1105
|
+
if (typeof tsconfig["display"] === "string") {
|
|
1106
|
+
tsconfig["display"] = displayName;
|
|
1107
|
+
writeFn(rootTsconfigPath, JSON.stringify(tsconfig, null, 2) + "\n");
|
|
1108
|
+
print(` ✓ tsconfig.json (display)`);
|
|
1109
|
+
}
|
|
1110
|
+
} catch {}
|
|
1103
1111
|
const configContent = generateHolocronConfig({
|
|
1104
1112
|
name: input.name,
|
|
1105
1113
|
type: input.type,
|
|
@@ -4173,7 +4181,7 @@ var codeql_default = "name: CodeQL\n\non: # yamllint disable-line rule:truthy\n
|
|
|
4173
4181
|
var dependencies_default = "name: Dependencies\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n merge-token:\n description: >\n Optional privileged token for auto-merge. Falls back to GITHUB_TOKEN.\n Required when branch protection enforces required reviews — GITHUB_TOKEN\n cannot approve its own PRs.\n required: false\n\njobs:\n dependabot:\n name: Update the dependencies\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n if: github.event.pull_request.user.login == 'dependabot[bot]'\n steps:\n - uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0\n name: Fetch Dependabot metadata\n id: metadata\n\n - run: gh pr merge --auto --squash \"$PR_URL\"\n # --squash is intentional: repo protection sets allow_merge_commit: false,\n # so --merge would fail on any repo using the standard preset.\n name: Enable auto-merge for Dependabot PRs\n if: steps.metadata.outputs.update-type == 'version-update:semver-patch'\n env:\n PR_URL: ${{ github.event.pull_request.html_url }}\n GH_TOKEN: ${{ secrets.merge-token || github.token }}\n";
|
|
4174
4182
|
//#endregion
|
|
4175
4183
|
//#region src/templates/workflows/deploy-docs.yml
|
|
4176
|
-
var deploy_docs_default = "name: Deploy Docs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n name:\n description: Repo name prefix used to derive package names (<name>-docs, <name>-site)\n required: true\n type: string\n use-turbo:\n description: Build content packages with pnpm turbo build (default true)\n required: false\n type: boolean\n default: true\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build content packages\n if: ${{ inputs.use-turbo }}\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm turbo build --filter=@theholocron/\"$DOCS_NAME\"-docs\n\n - name: Build content packages\n if: ${{ !inputs.use-turbo }}\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$DOCS_NAME\"-docs build\n\n - name: Build docs site\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$DOCS_NAME\"-site build\n\n - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1\n name: Upload pages artifact\n with:\n path: docs/dist\n\n deploy:\n name: Deploy\n needs: build\n runs-on: ubuntu-latest\n permissions:\n pages: write\n id-token: write\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n steps:\n - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5\n id: deployment\n name: Deploy to GitHub Pages\n";
|
|
4184
|
+
var deploy_docs_default = "name: Deploy Docs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n name:\n description: Repo name prefix used to derive package names (<name>-docs, <name>-site)\n required: true\n type: string\n use-turbo:\n description: Build content packages with pnpm turbo build (default true)\n required: false\n type: boolean\n default: true\n skip-content:\n description: Skip the content package build step (for repos with no <name>-docs package)\n required: false\n type: boolean\n default: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build content packages\n if: ${{ !inputs.skip-content && inputs.use-turbo }}\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm turbo build --filter=@theholocron/\"$DOCS_NAME\"-docs\n\n - name: Build content packages\n if: ${{ !inputs.skip-content && !inputs.use-turbo }}\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$DOCS_NAME\"-docs build\n\n - name: Build docs site\n env:\n DOCS_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$DOCS_NAME\"-site build\n\n - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1\n name: Upload pages artifact\n with:\n path: docs/dist\n\n deploy:\n name: Deploy\n needs: build\n runs-on: ubuntu-latest\n permissions:\n pages: write\n id-token: write\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n steps:\n - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5\n id: deployment\n name: Deploy to GitHub Pages\n";
|
|
4177
4185
|
//#endregion
|
|
4178
4186
|
//#region src/templates/workflows/deploy-storybook.yml
|
|
4179
4187
|
var deploy_storybook_default = "name: Deploy Storybook\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n build-script:\n description: pnpm script that builds the Storybook static output\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output\n type: string\n required: false\n default: storybook-static\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build Storybook\n run: pnpm run \"$BUILD_SCRIPT\"\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n\n - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1\n name: Upload pages artifact\n with:\n path: ${{ inputs.output-dir }}\n\n deploy:\n name: Deploy\n needs: build\n runs-on: ubuntu-latest\n permissions:\n pages: write\n id-token: write\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n steps:\n - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5\n id: deployment\n name: Deploy to GitHub Pages\n";
|