@leverege/build-tools 2.113.0 → 2.113.1

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/yarn-build.mjs +20 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.113.0",
3
+ "version": "2.113.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "firebaseServe": "src/firebaseServe.mjs",
38
38
  "gcp-snapshots": "src/gcp-snapshots.mjs",
39
39
  "generate-docs": "src/generate-docs.mjs",
40
- "github-actions-it": "src/github-actions-it.mjs",
41
40
  "getfbcfg": "src/getfbcfg.mjs",
42
41
  "getjson": "src/getjson.mjs",
43
42
  "git-tar": "src/git-tar.sh",
43
+ "github-actions-it": "src/github-actions-it.mjs",
44
44
  "helm-audit": "src/helm-audit.mjs",
45
45
  "helmboot": "src/helmup.sh",
46
46
  "helmcycle": "src/helmup.sh",
@@ -50,7 +50,6 @@
50
50
  "helmwhat": "src/helmup.sh",
51
51
  "hook-and-release": "src/hook-and-release.mjs",
52
52
  "init-my-chart": "src/init-my-chart/init-my-chart.mjs",
53
- "sync-chart-version": "src/sync-chart-version.mjs",
54
53
  "k8scale": "src/k8scale.sh",
55
54
  "k8x": "src/k8x.sh",
56
55
  "klog": "src/klog.sh",
@@ -70,6 +69,7 @@
70
69
  "send-to-slack": "src/send-to-slack.mjs",
71
70
  "service-man": "src/service-man/service-man.mjs",
72
71
  "snapshot-cnpg": "src/snapshot-cnpg.mjs",
72
+ "sync-chart-version": "src/sync-chart-version.mjs",
73
73
  "upload-model": "src/upload-model.sh",
74
74
  "yarn-build": "src/yarn-build.mjs"
75
75
  },
@@ -69,16 +69,27 @@ if ( isMonorepo ) {
69
69
  log( `Pruning workspace ${packageName}...` )
70
70
  await $$`yarn dlx turbo@^2 prune ${packageName} --out-dir ${buildDir}`
71
71
  } else {
72
- // Standalone package: nothing to prune. Copy the package's tracked and
73
- // non-ignored files into buildDir. `git ls-files --cached --others
74
- // --exclude-standard` honors .gitignore, so node_modules and build cruft are
75
- // excluded while the lockfile and package.json (both tracked) come along.
72
+ // Standalone package: nothing to prune, so the package dir itself is the
73
+ // deployable. Copy everything (including gitignored build output like a
74
+ // vite/tsc dist/) except: node_modules and .git, which the image rebuilds or
75
+ // does not need; .env* files and the top-level env/ dir, which hold dev-only
76
+ // secrets/config that must not ship.
76
77
  log( 'Standalone package (no workspace root); copying source, turbo prune skipped...' )
77
- const listed = await $`git -C ${process.env.INIT_CWD} ls-files --cached --others --exclude-standard`
78
- const files = listed.stdout.split( '\n' ).filter( Boolean )
79
- await Promise.all( files.map( rel => (
80
- fs.copy( path.join( process.env.INIT_CWD, rel ), path.join( buildDir, rel ) )
81
- ) ) )
78
+ await fs.copy( process.env.INIT_CWD, buildDir, {
79
+ filter : ( src ) => {
80
+ const base = path.basename( src )
81
+ if ( base === 'node_modules' || base === '.git' ) {
82
+ return false
83
+ }
84
+ if ( base.startsWith( '.env' ) || base.endsWith( '.env' ) ) {
85
+ return false
86
+ }
87
+ if ( path.relative( process.env.INIT_CWD, src ) === 'env' ) {
88
+ return false
89
+ }
90
+ return true
91
+ }
92
+ } )
82
93
  }
83
94
 
84
95
  log( 'Writing entrypoint...' )