@notation/cli 0.6.2 → 0.8.0
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 +16 -5
- package/package.json +9 -8
package/dist/index.js
CHANGED
|
@@ -19,14 +19,12 @@ async function compile(entryPoint, watch2 = false) {
|
|
|
19
19
|
log(`${watch2 ? "Watching" : "Compiling"} functions`);
|
|
20
20
|
const fnEntryPoints = await glob("runtime/**/*.fn.ts");
|
|
21
21
|
let disposeFnCompiler = await compileFns(fnEntryPoints, watch2);
|
|
22
|
-
if (!watch2)
|
|
23
|
-
return;
|
|
22
|
+
if (!watch2) return;
|
|
24
23
|
chokidar.watch("**/*.fn.ts", {
|
|
25
24
|
ignored: /node_modules/,
|
|
26
25
|
persistent: true
|
|
27
26
|
}).on("all", async () => {
|
|
28
|
-
if (disposeFnCompiler)
|
|
29
|
-
disposeFnCompiler();
|
|
27
|
+
if (disposeFnCompiler) disposeFnCompiler();
|
|
30
28
|
const fnEntryPoints2 = await glob("runtime/**/*.fn.ts");
|
|
31
29
|
disposeFnCompiler = await compileFns(fnEntryPoints2, watch2);
|
|
32
30
|
});
|
|
@@ -78,7 +76,20 @@ import { deployApp } from "@notation/core";
|
|
|
78
76
|
async function deploy(entryPoint) {
|
|
79
77
|
await compile(entryPoint);
|
|
80
78
|
console.log(`Deploying ${entryPoint}`);
|
|
81
|
-
|
|
79
|
+
try {
|
|
80
|
+
await deployApp(entryPoint);
|
|
81
|
+
} catch (err) {
|
|
82
|
+
if (err.name === "CredentialsProviderError") {
|
|
83
|
+
console.log(
|
|
84
|
+
"\nAWS credentials not found.",
|
|
85
|
+
"\n\nEnsure you have a default profile set up in ~/.aws/credentials.",
|
|
86
|
+
"\n\nIf using another profile run AWS_PROFILE=otherProfile notation deploy.\n"
|
|
87
|
+
);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
console.log(err);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
82
93
|
}
|
|
83
94
|
|
|
84
95
|
// src/destroy.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@notation/cli",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"templates"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"notation": "dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"chokidar": "^
|
|
14
|
-
"commander": "^
|
|
15
|
-
"esbuild": "^0.
|
|
16
|
-
"glob": "^
|
|
17
|
-
"@notation/
|
|
18
|
-
"@notation/
|
|
13
|
+
"chokidar": "^4.0.3",
|
|
14
|
+
"commander": "^13.1.0",
|
|
15
|
+
"esbuild": "^0.25.0",
|
|
16
|
+
"glob": "^11.0.1",
|
|
17
|
+
"@notation/core": "0.6.0",
|
|
18
|
+
"@notation/esbuild-plugins": "0.6.0",
|
|
19
19
|
"@notation/dashboard": "0.2.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup --clean",
|
|
26
|
-
"dev": "tsup --watch"
|
|
26
|
+
"dev": "tsup --watch",
|
|
27
|
+
"typecheck": "tsc --noEmit"
|
|
27
28
|
}
|
|
28
29
|
}
|