two-stroke 1.0.9 → 1.0.11
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/bin/deploy.mjs +5 -5
- package/bin/dev.mjs +1 -1
- package/bin/format.mjs +1 -1
- package/bin/lint.mjs +2 -2
- package/bin/test.mjs +3 -3
- package/package.json +2 -2
- package/src/cmd.mjs +10 -7
package/bin/deploy.mjs
CHANGED
|
@@ -9,17 +9,17 @@ const release = process.argv[3];
|
|
|
9
9
|
|
|
10
10
|
fs.writeFileSync("src/release.ts", `export default "${release}";`);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
cmd(`wrangler secret:bulk /dev/stdin --env ${env}`);
|
|
13
|
+
cmd(
|
|
14
14
|
`sentry-cli releases --org change-engine --project ${basename(process.cwd())} new ${release} --finalize`,
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
cmd(
|
|
18
18
|
`sentry-cli releases --org change-engine --project ${basename(process.cwd())} set-commits ${release}`,
|
|
19
19
|
);
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
cmd(`wrangler deploy --env ${env} --outdir dist`);
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
cmd(
|
|
24
24
|
`sentry-cli sourcemaps --org change-engine --project ${basename(process.cwd())} upload --release="${release}" dist`,
|
|
25
25
|
);
|
package/bin/dev.mjs
CHANGED
package/bin/format.mjs
CHANGED
package/bin/lint.mjs
CHANGED
package/bin/test.mjs
CHANGED
|
@@ -7,12 +7,12 @@ import openapiTS from "openapi-typescript";
|
|
|
7
7
|
import { Miniflare } from "miniflare";
|
|
8
8
|
|
|
9
9
|
if (fs.existsSync("wrangler.toml")) {
|
|
10
|
-
|
|
10
|
+
cmd("wrangler deploy --dry-run --outdir=dist");
|
|
11
11
|
const miniflare = new Miniflare({
|
|
12
12
|
modules: true,
|
|
13
13
|
scriptPath: "dist/index.js",
|
|
14
14
|
});
|
|
15
|
-
const request =
|
|
15
|
+
const request = fetch(
|
|
16
16
|
`${await miniflare.ready}doc`,
|
|
17
17
|
{ SENTRY_DSN: null, SENTRY_ENVIRONMENT: null },
|
|
18
18
|
null,
|
|
@@ -21,7 +21,7 @@ if (fs.existsSync("wrangler.toml")) {
|
|
|
21
21
|
await miniflare.dispose();
|
|
22
22
|
fs.writeFileSync("test/api.d.ts", types);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
cmd("vitest --globals --no-file-parallelism", [
|
|
25
25
|
...(!process.argv.slice(2).includes("-w") &&
|
|
26
26
|
!process.argv.slice(2).includes("--watch")
|
|
27
27
|
? ["--run"]
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"eslint-config-two-stroke": "^1.0.0",
|
|
20
20
|
"eslint-config-typescript": "^3.0.0",
|
|
21
21
|
"jose": "^5.2.3",
|
|
22
|
-
"jwk-subtle": "^1.0.
|
|
22
|
+
"jwk-subtle": "^1.0.7",
|
|
23
23
|
"miniflare": "^3.20240223.1",
|
|
24
24
|
"openapi-fetch": "^0.9.3",
|
|
25
25
|
"openapi-typescript": "^6.7.4",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"name": "two-stroke",
|
|
52
52
|
"packageManager": "yarn@4.1.0",
|
|
53
53
|
"type": "module",
|
|
54
|
-
"version": "1.0.
|
|
54
|
+
"version": "1.0.11",
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/eslint": "^8.56.5",
|
|
57
57
|
"@types/node": "^20.11.25",
|
package/src/cmd.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { spawnSync } from "child_process";
|
|
2
2
|
|
|
3
3
|
export function cmd(cmd, args = []) {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const { error, status } = spawnSync(
|
|
5
|
+
cmd.split(" ")[0],
|
|
6
|
+
[...cmd.split(" ").slice(1), ...args],
|
|
7
|
+
{
|
|
8
|
+
stdio: "inherit",
|
|
9
|
+
},
|
|
10
|
+
);
|
|
11
|
+
if (status) process.exit(status);
|
|
12
|
+
if (error) throw error;
|
|
10
13
|
}
|