@dcl/opscli 1.0.0-3008725431.commit-79c8a68 → 1.0.0-3011548184.commit-a126c38
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/README.md +40 -0
- package/dist/bin.js +2 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/parameters-manager.d.ts +2 -0
- package/dist/commands/parameters-manager.d.ts.map +1 -0
- package/dist/commands/parameters-manager.js +37 -0
- package/dist/commands/parameters-manager.js.map +1 -0
- package/dist/commands/secret-manager.d.ts.map +1 -1
- package/dist/commands/secret-manager.js +25 -49
- package/dist/commands/secret-manager.js.map +1 -1
- package/dist/commands/wearables-consistency.d.ts.map +1 -1
- package/dist/commands/wearables-consistency.js.map +1 -1
- package/dist/helpers/catalysts.d.ts.map +1 -1
- package/dist/helpers/catalysts.js +6 -7
- package/dist/helpers/catalysts.js.map +1 -1
- package/dist/helpers/rollouts.js +2 -5
- package/dist/helpers/rollouts.js.map +1 -1
- package/dist/helpers/sign-gpg.d.ts +3 -0
- package/dist/helpers/sign-gpg.d.ts.map +1 -0
- package/dist/helpers/sign-gpg.js +41 -0
- package/dist/helpers/sign-gpg.js.map +1 -0
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -50,3 +50,43 @@ Raw data for rollout "_site" for domain "play.decentraland.zone"
|
|
|
50
50
|
│ 16 │ 100 │ '0.0.1-1091984380.commit-77a1383' │
|
|
51
51
|
└─────────┴────────────┴───────────────────────────────────┘
|
|
52
52
|
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### `query-rollout`
|
|
56
|
+
|
|
57
|
+
Usage:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
$ npx @dcl/opscli query-rollout --domain play.decentraland.zone --rolloutName _site
|
|
61
|
+
|
|
62
|
+
Current rollouts for domain "play.decentraland.zone" for this request
|
|
63
|
+
┌─────────────────────┬────────────┬─────────────────────────┬───────────────────────────────────┐
|
|
64
|
+
│ (index) │ percentage │ prefix │ version │
|
|
65
|
+
├─────────────────────┼────────────┼─────────────────────────┼───────────────────────────────────┤
|
|
66
|
+
│ _site │ 100 │ '@dcl/explorer-website' │ '0.0.1-1133229304.commit-901ee9a' │
|
|
67
|
+
│ @dcl/kernel │ 100 │ '@dcl/kernel' │ '1.0.0-1133249286.commit-a9ca05e' │
|
|
68
|
+
│ @dcl/unity-renderer │ 100 │ '@dcl/unity-renderer' │ '1.0.10553' │
|
|
69
|
+
└─────────────────────┴────────────┴─────────────────────────┴───────────────────────────────────┘
|
|
70
|
+
Raw data for rollout "_site" for domain "play.decentraland.zone"
|
|
71
|
+
┌─────────┬────────────┬───────────────────────────────────┐
|
|
72
|
+
│ (index) │ percentage │ version │
|
|
73
|
+
├─────────┼────────────┼───────────────────────────────────┤
|
|
74
|
+
│ 0 │ 100 │ '0.0.1-1133229304.commit-901ee9a' │
|
|
75
|
+
│ 1 │ 100 │ '0.0.1-1129066963.commit-a6c2178' │
|
|
76
|
+
│ 2 │ 100 │ '0.0.1-1125482159.commit-645a9e8' │
|
|
77
|
+
│ 3 │ 100 │ '0.0.1-1124920935.commit-57e48a2' │
|
|
78
|
+
│ 4 │ 100 │ '0.0.1-1121248349.commit-0568cf7' │
|
|
79
|
+
│ 5 │ 100 │ '0.0.1-1120296389.commit-cd95321' │
|
|
80
|
+
│ 6 │ 100 │ '0.0.1-1120045215.commit-7d17a4e' │
|
|
81
|
+
│ 7 │ 100 │ '0.0.1-1117962007.commit-cd75435' │
|
|
82
|
+
│ 8 │ 100 │ '0.0.1-1117258971.commit-bee96ab' │
|
|
83
|
+
│ 9 │ 100 │ '0.0.1-1114103774.commit-cfe9ba9' │
|
|
84
|
+
│ 10 │ 100 │ '0.0.1-1114086203.commit-cc86da6' │
|
|
85
|
+
│ 11 │ 100 │ '0.0.1-1105802712.commit-80b54a0' │
|
|
86
|
+
│ 12 │ 100 │ '0.0.1-1105772932.commit-ff46bfb' │
|
|
87
|
+
│ 13 │ 100 │ '0.0.1-1105284880.commit-32d26de' │
|
|
88
|
+
│ 14 │ 100 │ '0.0.1-1094578839.commit-e8461eb' │
|
|
89
|
+
│ 15 │ 100 │ '0.0.1-1092142520.commit-746716e' │
|
|
90
|
+
│ 16 │ 100 │ '0.0.1-1091984380.commit-77a1383' │
|
|
91
|
+
└─────────┴────────────┴───────────────────────────────────┘
|
|
92
|
+
```
|
package/dist/bin.js
CHANGED
|
@@ -10,7 +10,8 @@ const commands = {
|
|
|
10
10
|
"wearables-consistency": "./commands/wearables-consistency",
|
|
11
11
|
"pointer-consistency": "./commands/pointer-consistency",
|
|
12
12
|
"update-renderer-upm": "./commands/update-renderer-upm",
|
|
13
|
-
"secret-manager": "./commands/secret-manager"
|
|
13
|
+
"secret-manager": "./commands/secret-manager",
|
|
14
|
+
"parameters-manager": "./commands/parameters-manager"
|
|
14
15
|
};
|
|
15
16
|
async function main() {
|
|
16
17
|
const commandName = process.argv[2];
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;AAEA,MAAa,QAAS,SAAQ,KAAK;CAAG;AAAtC,4BAAsC;AAEtC,MAAM,QAAQ,GAAG;IACf,eAAe,EAAE,0BAA0B;IAC3C,uBAAuB,EAAE,kCAAkC;IAC3D,qBAAqB,EAAE,gCAAgC;IACvD,qBAAqB,EAAE,gCAAgC;IACvD,gBAAgB,EAAE,2BAA2B;
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;AAEA,MAAa,QAAS,SAAQ,KAAK;CAAG;AAAtC,4BAAsC;AAEtC,MAAM,QAAQ,GAAG;IACf,eAAe,EAAE,0BAA0B;IAC3C,uBAAuB,EAAE,kCAAkC;IAC3D,qBAAqB,EAAE,gCAAgC;IACvD,qBAAqB,EAAE,gCAAgC;IACvD,gBAAgB,EAAE,2BAA2B;IAC7C,oBAAoB,EAAE,+BAA+B;CACtD,CAAA;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAA0B,CAAA;IAE5D,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC1C,MAAM,IAAI,QAAQ,CAChB,kCAAkC;YAChC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;iBAClB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,GAAG,CAAC,GAAG,IAAI,CAAC;iBAC3C,IAAI,CAAC,EAAE,CAAC,CACd,CAAA;KACF;IAED,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAA;IAEjD,MAAM,EAAE,EAAE,CAAA;AACZ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,IAAI,GAAG,YAAY,QAAQ,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;KACzB;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;KACnB;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters-manager.d.ts","sourceRoot":"","sources":["../../src/commands/parameters-manager.ts"],"names":[],"mappings":"AAMA,0CAkCC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const arg_1 = __importDefault(require("arg"));
|
|
7
|
+
const undici_1 = require("undici");
|
|
8
|
+
const assert_1 = require("../helpers/assert");
|
|
9
|
+
const sign_gpg_1 = require("../helpers/sign-gpg");
|
|
10
|
+
async function default_1() {
|
|
11
|
+
const args = (0, arg_1.default)({
|
|
12
|
+
"--env": String,
|
|
13
|
+
"--name": String,
|
|
14
|
+
"--value": String,
|
|
15
|
+
"--update": Boolean
|
|
16
|
+
});
|
|
17
|
+
const env = (0, assert_1.assert)(args["--env"], "--env is missing");
|
|
18
|
+
const name = (0, assert_1.assert)(args["--name"], "--name is missing");
|
|
19
|
+
const value = (0, assert_1.assert)(args["--value"], "--value is missing");
|
|
20
|
+
const update = !!args['--update'];
|
|
21
|
+
const fileContent = [env, name, value].join("\n");
|
|
22
|
+
const envDomain = env == "prd" ? "org" : env == "stg" ? "today" : "zone";
|
|
23
|
+
const signed = await (0, sign_gpg_1.signGpgCleartext)(fileContent);
|
|
24
|
+
console.log("> Uploading the parameter...");
|
|
25
|
+
const res = await (0, undici_1.fetch)(`https://ops-lambdas.decentraland.${envDomain}/parameters-manager`, {
|
|
26
|
+
method: update ? "PUT" : "POST",
|
|
27
|
+
body: signed.toString(),
|
|
28
|
+
});
|
|
29
|
+
const response = await res.text();
|
|
30
|
+
if (res.status != 200) {
|
|
31
|
+
throw new Error(`An error has occured while uploading the secret: ${response}`);
|
|
32
|
+
}
|
|
33
|
+
console.log(" OK! Response:");
|
|
34
|
+
console.log(response);
|
|
35
|
+
}
|
|
36
|
+
exports.default = default_1;
|
|
37
|
+
//# sourceMappingURL=parameters-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters-manager.js","sourceRoot":"","sources":["../../src/commands/parameters-manager.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AAErB,mCAA8B;AAC9B,8CAA0C;AAC1C,kDAAsD;AAEvC,KAAK;IAClB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,MAAM;QACjB,UAAU,EAAE,O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CAAC,CAAA;AACvB,CAAC;AAlCD,4BAkCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-manager.d.ts","sourceRoot":"","sources":["../../src/commands/secret-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secret-manager.d.ts","sourceRoot":"","sources":["../../src/commands/secret-manager.ts"],"names":[],"mappings":"AASA,0CA6CC"}
|
|
@@ -5,68 +5,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const arg_1 = __importDefault(require("arg"));
|
|
7
7
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
|
-
const os_1 = __importDefault(require("os"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
8
|
const undici_1 = require("undici");
|
|
11
|
-
const child_process_1 = require("child_process");
|
|
12
9
|
const assert_1 = require("../helpers/assert");
|
|
10
|
+
const sign_gpg_1 = require("../helpers/sign-gpg");
|
|
13
11
|
async function default_1() {
|
|
14
12
|
const args = (0, arg_1.default)({
|
|
15
13
|
"--env": String,
|
|
16
14
|
"--name": String,
|
|
17
15
|
"--secretFile": String,
|
|
16
|
+
"--secret": String,
|
|
18
17
|
"--update": Boolean,
|
|
19
18
|
});
|
|
20
19
|
let env = (0, assert_1.assert)(args["--env"], "--env is missing");
|
|
21
20
|
let name = (0, assert_1.assert)(args["--name"], "--name is missing");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const envDomain = env == "prd" ? "org" : env == "stg" ? "today" : "zone";
|
|
43
|
-
const { statusCode, body } = await (0, undici_1.request)(`https://ops-lambdas.decentraland.${envDomain}/secrets-manager`, { method: update ? "PUT" : "POST", body: signed.toString() });
|
|
44
|
-
let response = "";
|
|
45
|
-
for await (const data of body) {
|
|
46
|
-
response += data.toString();
|
|
47
|
-
}
|
|
48
|
-
if (statusCode != 200) {
|
|
49
|
-
if (response == "Signature could not be verified, ResourceExistsException: The operation failed because the secret test already exists.") {
|
|
50
|
-
return console.error("That secret already exist, please use '--update' if you want to update it");
|
|
51
|
-
}
|
|
52
|
-
return console.error(`An error has occured while uploading the secret: ${response}`);
|
|
53
|
-
}
|
|
54
|
-
console.log(response);
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
console.log(e);
|
|
58
|
-
console.error(`An error has occured while creating the temp folder`);
|
|
59
|
-
}
|
|
60
|
-
finally {
|
|
61
|
-
try {
|
|
62
|
-
if (tmpDir) {
|
|
63
|
-
await promises_1.default.rm(tmpDir, { recursive: true });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
catch (e) {
|
|
67
|
-
console.error(`An error has occurred while removing the temp folder at ${tmpDir}. Please remove it manually. Error: ${e}`);
|
|
21
|
+
const hasSecretValue = !!args["--secret"];
|
|
22
|
+
const hasSecretFile = !!args["--secretFile"];
|
|
23
|
+
if (hasSecretValue && hasSecretFile)
|
|
24
|
+
throw new Error("--secretFile and --secret cannot be used at the same time");
|
|
25
|
+
if (!hasSecretValue && !hasSecretFile)
|
|
26
|
+
throw new Error("You must provide either --secretFile or --secret");
|
|
27
|
+
const secretContent = hasSecretValue || (await promises_1.default.readFile(args["--secretFile"])).toString();
|
|
28
|
+
const update = !!args["--update"];
|
|
29
|
+
const fileContent = [env, name, secretContent].join("\n");
|
|
30
|
+
const envDomain = env == "prd" ? "org" : env == "stg" ? "today" : "zone";
|
|
31
|
+
const signed = await (0, sign_gpg_1.signGpgCleartext)(fileContent);
|
|
32
|
+
console.log("> Uploading the secrets...");
|
|
33
|
+
const res = await (0, undici_1.fetch)(`https://ops-lambdas.decentraland.${envDomain}/secrets-manager`, {
|
|
34
|
+
method: update ? "PUT" : "POST",
|
|
35
|
+
body: signed.toString(),
|
|
36
|
+
});
|
|
37
|
+
const response = await res.text();
|
|
38
|
+
if (res.status != 200) {
|
|
39
|
+
if (response.includes("ResourceExistsException")) {
|
|
40
|
+
throw new Error("That secret already exist, please use '--update' if you want to update it");
|
|
68
41
|
}
|
|
42
|
+
throw new Error(`An error has occured while uploading the secret: ${response}`);
|
|
69
43
|
}
|
|
44
|
+
console.log(" OK! Response:");
|
|
45
|
+
console.log(response);
|
|
70
46
|
}
|
|
71
47
|
exports.default = default_1;
|
|
72
48
|
//# sourceMappingURL=secret-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-manager.js","sourceRoot":"","sources":["../../src/commands/secret-manager.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,2DAA4B;
|
|
1
|
+
{"version":3,"file":"secret-manager.js","sourceRoot":"","sources":["../../src/commands/secret-manager.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,2DAA4B;AAG5B,mCAA8B;AAE9B,8CAA0C;AAC1C,kDAAsD;AAEvC,KAAK;IAClB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE,MAAM;QACtB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,OAAO;KACpB,CAAC,CAAA;IAEF,IAAI,GAAG,GAAG,IAAA,eAAM,EAAC,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAA;IACnD,IAAI,IAAI,GAAG,IAAA,eAAM,EAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAA;IACtD,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACzC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CA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DAAoD,QAAQ,EAAE,CAAC,CAAA;KAChF;IAED,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAE9B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AACvB,CAAC;AA7CD,4BA6CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wearables-consistency.d.ts","sourceRoot":"","sources":["../../src/commands/wearables-consistency.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wearables-consistency.d.ts","sourceRoot":"","sources":["../../src/commands/wearables-consistency.ts"],"names":[],"mappings":"AAIA,0CAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wearables-consistency.js","sourceRoot":"","sources":["../../src/commands/wearables-consistency.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;
|
|
1
|
+
{"version":3,"file":"wearables-consistency.js","sourceRoot":"","sources":["../../src/commands/wearables-consistency.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,8CAA0C;AAC1C,oDAA4E;AAE7D,KAAK;IAClB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,WAAW,EAAE,MAAM;KACpB,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,IAAA,eAAM,EAAC,IAAI,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC,CAAA;IAEjE,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,GAAE,CAAA;IAEtC,OAAO,CAAC,GAAG,CAAC,SAAS,SAAS,CAAC,MAAM,YAAY,CAAC,CAAA;IAClD,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAA;IAErD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAuB,EAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IAE3G,KAAK,IAAI,MAAM,IAAI,OAAO,EAAE;QAC1B,IAAI,MAAM,CAAC,MAAM,IAAI,WAAW,EAAE;YAChC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;SAChF;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;SAC7B;KACF;AACH,CAAC;AArBD,4BAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalysts.d.ts","sourceRoot":"","sources":["../../src/helpers/catalysts.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAGhE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;aAKvD,MAAM;gBAAU,MAAM;;GAE5C;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;
|
|
1
|
+
{"version":3,"file":"catalysts.d.ts","sourceRoot":"","sources":["../../src/helpers/catalysts.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAGhE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;aAKvD,MAAM;gBAAU,MAAM;;GAE5C;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;kBAQ3D,MAAM;uBACD,MAAM;oBACT,MAAM;yBACD,MAAM;wBACP,MAAM;kBACZ,OAAO;kBACP,MAAM,EAAE;iBACT;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE;;GAG7C"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.fetchEntityByPointer = exports.fetchWearablesByAddress = exports.daoCatalysts = void 0;
|
|
7
|
-
const
|
|
4
|
+
const undici_1 = require("undici");
|
|
8
5
|
async function daoCatalysts() {
|
|
9
6
|
console.log("> Fetching DAO catalysts");
|
|
10
|
-
return await (0,
|
|
7
|
+
return (await (0, undici_1.fetch)("https://peer.decentraland.org/lambdas/contracts/servers").then(($) => $.json()));
|
|
11
8
|
}
|
|
12
9
|
exports.daoCatalysts = daoCatalysts;
|
|
13
10
|
async function fetchWearablesByAddress(baseUrl, address) {
|
|
14
11
|
return {
|
|
15
12
|
baseUrl,
|
|
16
|
-
wearables: (await (0,
|
|
13
|
+
wearables: (await (0, undici_1.fetch)(`${baseUrl}/lambdas/collections/wearables-by-owner/${address}`).then(($) => $.json())),
|
|
17
14
|
};
|
|
18
15
|
}
|
|
19
16
|
exports.fetchWearablesByAddress = fetchWearablesByAddress;
|
|
20
17
|
async function fetchEntityByPointer(baseUrl, pointer) {
|
|
21
18
|
return {
|
|
22
19
|
baseUrl,
|
|
23
|
-
deployments: (await (0,
|
|
20
|
+
deployments: (await (0, undici_1.fetch)(`${baseUrl}/content/deployments?pointer=${encodeURIComponent(pointer)}&onlyCurrentlyPointed=true`)
|
|
21
|
+
.then(($) => $.json())
|
|
22
|
+
.then(($) => $.deployments)),
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
25
|
exports.fetchEntityByPointer = fetchEntityByPointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalysts.js","sourceRoot":"","sources":["../../src/helpers/catalysts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalysts.js","sourceRoot":"","sources":["../../src/helpers/catalysts.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAQvB,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;IACvC,OAAO,CAAC,MAAM,IAAA,cAAK,EAAC,yDAAyD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAQ,CAAA;AAC9G,CAAC;AAHD,oCAGC;AAEM,KAAK,UAAU,uBAAuB,CAAC,OAAe,EAAE,OAAe;IAC5E,OAAO;QACL,OAAO;QACP,SAAS,EAAE,CAAC,MAAM,IAAA,cAAK,EAAC,GAAG,OAAO,2CAA2C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CACjG,CAAC,CAAC,IAAI,EAAE,CACT,CAA2C;KAC7C,CAAA;AACH,CAAC;AAPD,0DAOC;AAEM,KAAK,UAAU,oBAAoB,CAAC,OAAe,EAAE,OAAe;IACzE,OAAO;QACL,OAAO;QACP,WAAW,EAAE,CAAC,MAAM,IAAA,cAAK,EACvB,GAAG,OAAO,gCAAgC,kBAAkB,CAAC,OAAO,CAAC,4BAA4B,CAClG;aACE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACrB,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAShC;KACH,CAAA;AACH,CAAC;AAlBD,oDAkBC"}
|
package/dist/helpers/rollouts.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.checkRollouts = void 0;
|
|
7
|
-
const
|
|
4
|
+
const undici_1 = require("undici");
|
|
8
5
|
/**
|
|
9
6
|
* @public
|
|
10
7
|
*/
|
|
11
8
|
async function checkRollouts(domain) {
|
|
12
9
|
const url = `https://${domain}`;
|
|
13
|
-
const res = await (0,
|
|
10
|
+
const res = await (0, undici_1.fetch)(url, { headers: { "x-debug-rollouts": "true" } });
|
|
14
11
|
if (!res.ok)
|
|
15
12
|
throw new Error("Non-ok response from " + url);
|
|
16
13
|
return res.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollouts.js","sourceRoot":"","sources":["../../src/helpers/rollouts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollouts.js","sourceRoot":"","sources":["../../src/helpers/rollouts.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAgB9B;;GAEG;AACI,KAAK,UAAU,aAAa,CAAC,MAAc;IAChD,MAAM,GAAG,GAAG,WAAW,MAAM,EAAE,CAAA;IAC/B,MAAM,GAAG,GAAG,MAAM,IAAA,cAAK,EAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;IACzE,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAA;IAC3D,OAAO,GAAG,CAAC,IAAI,EAAS,CAAA;AAC1B,CAAC;AALD,sCAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-gpg.d.ts","sourceRoot":"","sources":["../../src/helpers/sign-gpg.ts"],"names":[],"mappings":";AAKA,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,mBA0BrD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.signGpgCleartext = void 0;
|
|
7
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
|
+
const os_1 = __importDefault(require("os"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const child_process_1 = require("child_process");
|
|
11
|
+
async function signGpgCleartext(payload) {
|
|
12
|
+
const tmpDir = await promises_1.default.mkdtemp(path_1.default.join(os_1.default.tmpdir(), "secret"));
|
|
13
|
+
const filename = path_1.default.join(tmpDir, "tmp.txt");
|
|
14
|
+
await promises_1.default.writeFile(filename, payload);
|
|
15
|
+
try {
|
|
16
|
+
console.log("> Signing payload with GPG, if you are using a Yubikey, please press it");
|
|
17
|
+
await new Promise((resolve, reject) => {
|
|
18
|
+
(0, child_process_1.exec)(`gpg --clearsign ${filename}`, {}, (err, stdout, stderr) => {
|
|
19
|
+
if (err === null)
|
|
20
|
+
resolve(undefined);
|
|
21
|
+
if (stderr)
|
|
22
|
+
reject(stderr);
|
|
23
|
+
else
|
|
24
|
+
reject("Error while signing the secrets");
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return await promises_1.default.readFile(path_1.default.join(tmpDir, "tmp.txt.asc"));
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
try {
|
|
31
|
+
if (tmpDir) {
|
|
32
|
+
await promises_1.default.rm(tmpDir, { recursive: true });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.error(`An error has occurred while removing the temp folder at ${tmpDir}. Please remove it manually. Error: ${e}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.signGpgCleartext = signGpgCleartext;
|
|
41
|
+
//# sourceMappingURL=sign-gpg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-gpg.js","sourceRoot":"","sources":["../../src/helpers/sign-gpg.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA4B;AAC5B,4CAAmB;AACnB,gDAAuB;AACvB,iDAAoC;AAE7B,KAAK,UAAU,gBAAgB,CAAC,OAAe;IACpD,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAA;IACjE,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC7C,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IACrC,IAAI;QACF,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAA;QACtF,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACpC,IAAA,oBAAI,EAAC,mBAAmB,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;gBAC9D,IAAI,GAAG,KAAK,IAAI;oBAAE,OAAO,CAAC,SAAS,CAAC,CAAA;gBACpC,IAAI,MAAM;oBAAE,MAAM,CAAC,MAAM,CAAC,CAAA;;oBACrB,MAAM,CAAC,iCAAiC,CAAC,CAAA;YAChD,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;KAC3D;YAAS;QACR,IAAI;YACF,IAAI,MAAM,EAAE;gBACV,MAAM,kBAAE,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;aACzC;SACF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CACX,2DAA2D,MAAM,uCAAuC,CAAC,EAAE,CAC5G,CAAA;SACF;KACF;AACH,CAAC;AA1BD,4CA0BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/opscli",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-3011548184.commit-a126c38",
|
|
4
4
|
"description": "base component",
|
|
5
5
|
"bin": "dist/bin.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,19 +28,17 @@
|
|
|
28
28
|
"@microsoft/api-extractor": "^7.17.0",
|
|
29
29
|
"@types/jest": "^26.0.23",
|
|
30
30
|
"@types/node": "^14.17.4",
|
|
31
|
-
"@types/node-fetch": "^2.5.12",
|
|
32
31
|
"jest": "^27.0.6",
|
|
33
32
|
"ts-jest": "^27.0.3",
|
|
34
33
|
"typescript": "^4.3.5"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"arg": "^5.0.
|
|
38
|
-
"
|
|
39
|
-
"simple-git": "^3.1.1",
|
|
36
|
+
"arg": "^5.0.2",
|
|
37
|
+
"simple-git": "^3.14.0",
|
|
40
38
|
"undici": "^5.10.0"
|
|
41
39
|
},
|
|
42
40
|
"files": [
|
|
43
41
|
"dist"
|
|
44
42
|
],
|
|
45
|
-
"commit": "
|
|
43
|
+
"commit": "a126c38e5494084cbb88fdb801eac59ddaf51139"
|
|
46
44
|
}
|