@blossm/deploy-cli-template 0.0.680 → 0.0.682
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/deps.js +3 -0
- package/index.js +26 -36
- package/package.json +12 -11
package/deps.js
ADDED
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import roboSay from "@blossm/robo-say";
|
|
|
3
3
|
import mergeCliTemplate from "@blossm/merge-cli-template";
|
|
4
4
|
import testCliTemplate from "@blossm/test-cli-template";
|
|
5
5
|
import fs from "fs-extra";
|
|
6
|
-
import
|
|
6
|
+
import deps from "./deps.js";
|
|
7
7
|
import rootDir from "@blossm/cli-root-dir";
|
|
8
8
|
import path from "path";
|
|
9
9
|
import chalk from "chalk";
|
|
@@ -29,23 +29,20 @@ const envProject = ({ env, config }) => {
|
|
|
29
29
|
const build = async ({ workingDir, env }) => {
|
|
30
30
|
const blossmConfig = rootDir.config();
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
);
|
|
47
|
-
return error ? reject(error) : resolve();
|
|
48
|
-
});
|
|
32
|
+
deps.execFileSync(
|
|
33
|
+
"gcloud",
|
|
34
|
+
[
|
|
35
|
+
"builds",
|
|
36
|
+
"submit",
|
|
37
|
+
".",
|
|
38
|
+
"--config=build.yaml",
|
|
39
|
+
`--project=${envProject({ config: blossmConfig, env })}`,
|
|
40
|
+
],
|
|
41
|
+
{
|
|
42
|
+
stdio: [process.stdin, process.stdout, process.stderr],
|
|
43
|
+
cwd: workingDir,
|
|
44
|
+
}
|
|
45
|
+
);
|
|
49
46
|
};
|
|
50
47
|
|
|
51
48
|
export default ({ domain, dir }) => async (args, configFn) => {
|
|
@@ -88,16 +85,17 @@ export default ({ domain, dir }) => async (args, configFn) => {
|
|
|
88
85
|
roboSay(`Deploying ${e} by assembling template into ${workingDir}...`)
|
|
89
86
|
);
|
|
90
87
|
|
|
91
|
-
await mergeCliTemplate({
|
|
92
|
-
scriptDir: dir,
|
|
93
|
-
workingDir,
|
|
94
|
-
env: e,
|
|
95
|
-
path: input.path,
|
|
96
|
-
dry: input.dryRun,
|
|
97
|
-
configFn,
|
|
98
|
-
});
|
|
99
|
-
|
|
100
88
|
try {
|
|
89
|
+
// Assembly failures also remove the working directory.
|
|
90
|
+
await mergeCliTemplate({
|
|
91
|
+
scriptDir: dir,
|
|
92
|
+
workingDir,
|
|
93
|
+
env: e,
|
|
94
|
+
path: input.path,
|
|
95
|
+
dry: input.dryRun,
|
|
96
|
+
configFn,
|
|
97
|
+
});
|
|
98
|
+
|
|
101
99
|
if (input.unitTest) {
|
|
102
100
|
//eslint-disable-next-line no-console
|
|
103
101
|
console.log(roboSay("Running your tests..."));
|
|
@@ -106,15 +104,6 @@ export default ({ domain, dir }) => async (args, configFn) => {
|
|
|
106
104
|
//eslint-disable-next-line no-console
|
|
107
105
|
console.log(roboSay(), green.bold("done"));
|
|
108
106
|
} else {
|
|
109
|
-
const modules = "node_modules";
|
|
110
|
-
const lock = "yarn.lock";
|
|
111
|
-
|
|
112
|
-
const modulesPath = path.resolve(process.cwd(), modules);
|
|
113
|
-
const lockPath = path.resolve(process.cwd(), lock);
|
|
114
|
-
|
|
115
|
-
fs.removeSync(modulesPath);
|
|
116
|
-
fs.removeSync(lockPath);
|
|
117
|
-
|
|
118
107
|
//eslint-disable-next-line no-console
|
|
119
108
|
console.log(
|
|
120
109
|
roboSay(
|
|
@@ -135,6 +124,7 @@ export default ({ domain, dir }) => async (args, configFn) => {
|
|
|
135
124
|
fs.removeSync(workingDir);
|
|
136
125
|
//eslint-disable-next-line no-console
|
|
137
126
|
console.log(roboSay("Something went wrong"), red.bold("error"));
|
|
127
|
+
throw e;
|
|
138
128
|
}
|
|
139
129
|
})
|
|
140
130
|
);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blossm/deploy-cli-template",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.682",
|
|
4
4
|
"description": "Deploys a template to cloud build.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "blossm.network",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">= 24.22.1"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
"test": "echo \"Error: no test specified\" && exit 0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@blossm/
|
|
19
|
-
"@blossm/
|
|
20
|
-
"@blossm/
|
|
21
|
-
"@blossm/
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
18
|
+
"@blossm/cli-root-dir": "^0.0.17",
|
|
19
|
+
"@blossm/merge-cli-template": "^0.0.646",
|
|
20
|
+
"@blossm/normalize-cli": "^0.0.23",
|
|
21
|
+
"@blossm/robo-say": "^0.0.12",
|
|
22
|
+
"@blossm/test-cli-template": "^0.0.24",
|
|
23
|
+
"chalk": "^5.6.2",
|
|
24
|
+
"fs-extra": "^11.4.1",
|
|
25
|
+
"yaml": "^2.9.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"mocha": "^
|
|
28
|
+
"mocha": "^12.0.3"
|
|
28
29
|
},
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "bdb8a728dbf7735097817eaad9f20c3207ae1f8d"
|
|
30
31
|
}
|