jazz-run 0.8.30 → 0.8.32
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +22 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +8 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# jazz-run
|
2
2
|
|
3
|
+
## 0.8.32
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 2e2a13f: Add --json option to output the account data as json
|
8
|
+
- Updated dependencies [df42b2b]
|
9
|
+
- Updated dependencies [df42b2b]
|
10
|
+
- cojson@0.8.32
|
11
|
+
- jazz-tools@0.8.32
|
12
|
+
- cojson-storage-sqlite@0.8.32
|
13
|
+
- cojson-transport-ws@0.8.32
|
14
|
+
|
15
|
+
## 0.8.31
|
16
|
+
|
17
|
+
### Patch Changes
|
18
|
+
|
19
|
+
- Updated dependencies [e511d6d]
|
20
|
+
- cojson@0.8.31
|
21
|
+
- cojson-storage-sqlite@0.8.31
|
22
|
+
- cojson-transport-ws@0.8.31
|
23
|
+
- jazz-tools@0.8.31
|
24
|
+
|
3
25
|
## 0.8.30
|
4
26
|
|
5
27
|
### Patch Changes
|
package/dist/index.js
CHANGED
@@ -7,16 +7,22 @@ import { createWorkerAccount } from "./createWorkerAccount.js";
|
|
7
7
|
import { startSyncServer } from "./startSyncServer.js";
|
8
8
|
const jazzTools = Command.make("jazz-tools");
|
9
9
|
const nameOption = Options.text("name").pipe(Options.withAlias("n"));
|
10
|
+
const jsonOption = Options.boolean("json");
|
10
11
|
const peerOption = Options.text("peer")
|
11
12
|
.pipe(Options.withAlias("p"))
|
12
13
|
.pipe(Options.withDefault("wss://cloud.jazz.tools"));
|
13
|
-
const createAccountCommand = Command.make("create", { name: nameOption, peer: peerOption }, ({ name, peer }) => {
|
14
|
+
const createAccountCommand = Command.make("create", { name: nameOption, peer: peerOption, json: jsonOption }, ({ name, peer, json }) => {
|
14
15
|
return Effect.gen(function* () {
|
15
16
|
const { accountId, agentSecret } = yield* Effect.promise(() => createWorkerAccount({ name, peer }));
|
16
|
-
|
17
|
+
if (json) {
|
18
|
+
Console.log(JSON.stringify({ accountId, agentSecret }));
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
yield* Console.log(`# Credentials for Jazz account "${name}":
|
17
22
|
JAZZ_WORKER_ACCOUNT=${accountId}
|
18
23
|
JAZZ_WORKER_SECRET=${agentSecret}
|
19
24
|
`);
|
25
|
+
}
|
20
26
|
});
|
21
27
|
});
|
22
28
|
const accountCommand = Command.make("account").pipe(Command.withSubcommands([createAccountCommand]));
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,uCAAuC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAE7C,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;KACpC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;KAC5B,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAC;AAEvD,MAAM,oBAAoB,GAAG,OAAO,CAAC,IAAI,CACvC,QAAQ,EACR,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AE,EAAE,QAAQ,EAAE,EAC5D,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE;IACzB,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACzB,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAErE,OAAO,CAAC,GAAG,CAAC,kDAAkD,IAAI,EAAE,CAAC,CAAC;QAEtE,qBAAqB;QACrB,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAC5B,OAAO,CAAC,eAAe,CAAC,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAClE,CAAC;AAEF,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAC1C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EACjC,WAAW,CAAC,OAAO,CACpB,CAAC"}
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"bin": "./dist/index.js",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
|
-
"version": "0.8.
|
6
|
+
"version": "0.8.32",
|
7
7
|
"dependencies": {
|
8
8
|
"@effect/cli": "^0.41.2",
|
9
9
|
"@effect/platform-node": "^0.57.2",
|
@@ -11,11 +11,11 @@
|
|
11
11
|
"@effect/printer-ansi": "^0.34.5",
|
12
12
|
"@effect/schema": "^0.71.1",
|
13
13
|
"@effect/typeclass": "^0.25.5",
|
14
|
-
"cojson": "0.8.
|
15
|
-
"cojson-storage-sqlite": "0.8.
|
16
|
-
"cojson-transport-ws": "0.8.
|
14
|
+
"cojson": "0.8.32",
|
15
|
+
"cojson-storage-sqlite": "0.8.32",
|
16
|
+
"cojson-transport-ws": "0.8.32",
|
17
17
|
"effect": "^3.6.5",
|
18
|
-
"jazz-tools": "0.8.
|
18
|
+
"jazz-tools": "0.8.32",
|
19
19
|
"ws": "^8.14.2"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
package/src/index.ts
CHANGED
@@ -9,23 +9,28 @@ import { startSyncServer } from "./startSyncServer.js";
|
|
9
9
|
const jazzTools = Command.make("jazz-tools");
|
10
10
|
|
11
11
|
const nameOption = Options.text("name").pipe(Options.withAlias("n"));
|
12
|
+
const jsonOption = Options.boolean("json");
|
12
13
|
const peerOption = Options.text("peer")
|
13
14
|
.pipe(Options.withAlias("p"))
|
14
15
|
.pipe(Options.withDefault("wss://cloud.jazz.tools"));
|
15
16
|
|
16
17
|
const createAccountCommand = Command.make(
|
17
18
|
"create",
|
18
|
-
{ name: nameOption, peer: peerOption },
|
19
|
-
({ name, peer }) => {
|
19
|
+
{ name: nameOption, peer: peerOption, json: jsonOption },
|
20
|
+
({ name, peer, json }) => {
|
20
21
|
return Effect.gen(function* () {
|
21
22
|
const { accountId, agentSecret } = yield* Effect.promise(() =>
|
22
23
|
createWorkerAccount({ name, peer }),
|
23
24
|
);
|
24
25
|
|
25
|
-
|
26
|
+
if (json) {
|
27
|
+
Console.log(JSON.stringify({ accountId, agentSecret }));
|
28
|
+
} else {
|
29
|
+
yield* Console.log(`# Credentials for Jazz account "${name}":
|
26
30
|
JAZZ_WORKER_ACCOUNT=${accountId}
|
27
31
|
JAZZ_WORKER_SECRET=${agentSecret}
|
28
32
|
`);
|
33
|
+
}
|
29
34
|
});
|
30
35
|
},
|
31
36
|
);
|