@glash/cli 0.2.40 → 0.2.41
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/lib/project-build.mjs +7 -1
- package/lib/zip.mjs +9 -0
- package/package.json +1 -1
package/lib/project-build.mjs
CHANGED
|
@@ -63,9 +63,15 @@ export async function buildProjectBeforeDeploy(cwd, {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
await new Promise((resolve, reject) => {
|
|
66
|
+
// Build scripts are arbitrary project code. Do not hand them Glash control
|
|
67
|
+
// plane or package-publishing credentials inherited by the CLI process.
|
|
68
|
+
const buildEnv = { ...env, GLASH_CLI_BUILD_RUNNING: '1' };
|
|
69
|
+
for (const key of ['GLASH_TOKEN', 'GLASH_API_TOKEN', 'NPM_TOKEN', 'NODE_AUTH_TOKEN']) {
|
|
70
|
+
delete buildEnv[key];
|
|
71
|
+
}
|
|
66
72
|
const child = spawnImpl(plan.command, plan.args, {
|
|
67
73
|
cwd,
|
|
68
|
-
env:
|
|
74
|
+
env: buildEnv,
|
|
69
75
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
70
76
|
});
|
|
71
77
|
|
package/lib/zip.mjs
CHANGED
|
@@ -72,6 +72,15 @@ export async function zipDirectory(sourceDir, outPath, { ignore = [], includeGla
|
|
|
72
72
|
'**/.env.production',
|
|
73
73
|
'.env.development',
|
|
74
74
|
'**/.env.development',
|
|
75
|
+
'.env.*',
|
|
76
|
+
'**/.env.*',
|
|
77
|
+
'.npmrc',
|
|
78
|
+
'**/.npmrc',
|
|
79
|
+
'**/credentials*.json',
|
|
80
|
+
'**/*service-account*.json',
|
|
81
|
+
'**/*.pem',
|
|
82
|
+
'**/*.key',
|
|
83
|
+
'**/.ssh/**',
|
|
75
84
|
];
|
|
76
85
|
const allIgnore = [...new Set([...defaultIgnore, ...loadIgnorePatterns(sourceDir), ...ignore])];
|
|
77
86
|
const overridePaths = new Set(Object.keys(overrides));
|
package/package.json
CHANGED