@dcl/opscli 1.0.0-3932976398.commit-a4b8069 → 1.0.0-4128233430.commit-8f0a990
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 +32 -0
- package/dist/bin.js +2 -0
- package/dist/bin.js.map +1 -1
- package/dist/commands/deploy-entity.d.ts +3 -0
- package/dist/commands/deploy-entity.d.ts.map +1 -0
- package/dist/commands/deploy-entity.js +88 -0
- package/dist/commands/deploy-entity.js.map +1 -0
- package/dist/commands/download-entity.d.ts.map +1 -1
- package/dist/commands/download-entity.js +3 -3
- package/dist/commands/download-entity.js.map +1 -1
- package/dist/commands/queue-ab-conversion.d.ts +3 -0
- package/dist/commands/queue-ab-conversion.d.ts.map +1 -0
- package/dist/commands/queue-ab-conversion.js +63 -0
- package/dist/commands/queue-ab-conversion.js.map +1 -0
- package/dist/helpers/asset-bundles.d.ts +5 -0
- package/dist/helpers/asset-bundles.d.ts.map +1 -0
- package/dist/helpers/asset-bundles.js +22 -0
- package/dist/helpers/asset-bundles.js.map +1 -0
- package/dist/helpers/downloads.d.ts +1 -1
- package/dist/helpers/downloads.d.ts.map +1 -1
- package/dist/helpers/downloads.js +3 -3
- package/dist/helpers/downloads.js.map +1 -1
- package/dist/helpers/recurse-folder.d.ts +2 -0
- package/dist/helpers/recurse-folder.d.ts.map +1 -0
- package/dist/helpers/recurse-folder.js +36 -0
- package/dist/helpers/recurse-folder.js.map +1 -0
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -12,6 +12,18 @@ Check the active deployment by pointer on every catalyst, usage:
|
|
|
12
12
|
npx @dcl/opscli pointer-consistency --pointer "0,0"
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
### Schedule asset bundle conversion
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npx @dcl/opscli queue-ab-conversion \
|
|
19
|
+
--pointer "0,0" \
|
|
20
|
+
--pointer "110,10" \
|
|
21
|
+
--cid "110,10" \
|
|
22
|
+
--token <ACCESS_TOKEN> \
|
|
23
|
+
[--ab-server https://asset-bundle-converter.decentraland.org] \
|
|
24
|
+
[--content-server https://peer.decentraland.org/content]
|
|
25
|
+
```
|
|
26
|
+
|
|
15
27
|
### `query-rollout`
|
|
16
28
|
|
|
17
29
|
Usage:
|
|
@@ -69,6 +81,26 @@ $ npx @dcl/opscli download-entity \
|
|
|
69
81
|
--out ~/Downloads
|
|
70
82
|
```
|
|
71
83
|
|
|
84
|
+
### `deploy-entity`
|
|
85
|
+
|
|
86
|
+
Deploys an entity to a content server
|
|
87
|
+
|
|
88
|
+
- `--pointer` Pointers of the entities, can be used many times, e.g. `--pointer=0,0 --pointer=0,1`
|
|
89
|
+
- `--entity-type` Entity type
|
|
90
|
+
- `--private-key` or `PRIVATE_KEY` env var
|
|
91
|
+
- `--dry` do everything except publishing the entity
|
|
92
|
+
- `--folder` to deploy, root level paths starting with `.` will be ignored, i.e. for .git folder. the `.metadata` file is required to create the entity
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
$ npx @dcl/opscli deploy-entity \
|
|
96
|
+
--dry \
|
|
97
|
+
--content-server https://peer.decentraland.org/content \
|
|
98
|
+
--entity-type wearable \
|
|
99
|
+
--folder=urn:decentraland:off-chain:base-avatars:brown_pants \
|
|
100
|
+
--pointer=urn:decentraland:off-chain:base-avatars:brown_pants \
|
|
101
|
+
--private-key=bde921a4a4abc644cced18f632aed0b3d34b1b36bc16fd97721ade1b7178cfff
|
|
102
|
+
```
|
|
103
|
+
|
|
72
104
|
### `query-rollout`
|
|
73
105
|
|
|
74
106
|
Usage:
|
package/dist/bin.js
CHANGED
|
@@ -13,6 +13,8 @@ const commands = {
|
|
|
13
13
|
"secret-manager": "./commands/secret-manager",
|
|
14
14
|
"parameters-manager": "./commands/parameters-manager",
|
|
15
15
|
"download-entity": "./commands/download-entity",
|
|
16
|
+
"deploy-entity": "./commands/deploy-entity",
|
|
17
|
+
"queue-ab-conversion": "./commands/queue-ab-conversion",
|
|
16
18
|
"circleci": "./commands/circleci"
|
|
17
19
|
};
|
|
18
20
|
async function main() {
|
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;IAC7C,oBAAoB,EAAE,+BAA+B;IACrD,iBAAiB,EAAE,4BAA4B;IAC/C,UAAU,EAAE,qBAAqB;CAClC,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;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AAG,CAAC,CAAA;KACnB;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-entity.d.ts","sourceRoot":"","sources":["../../src/commands/deploy-entity.ts"],"names":[],"mappings":";AAaA,wBAsFC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 promises_1 = require("fs/promises");
|
|
7
|
+
const eth_crypto_1 = __importDefault(require("eth-crypto"));
|
|
8
|
+
const dcl_catalyst_client_1 = require("dcl-catalyst-client");
|
|
9
|
+
const crypto_1 = require("@dcl/crypto");
|
|
10
|
+
const eth_connect_1 = require("eth-connect");
|
|
11
|
+
const crypto_2 = require("@dcl/crypto/dist/crypto");
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const fs_1 = require("fs");
|
|
14
|
+
const bin_1 = require("../bin");
|
|
15
|
+
const arg_1 = __importDefault(require("arg"));
|
|
16
|
+
const console_1 = require("console");
|
|
17
|
+
const recurse_folder_1 = require("../helpers/recurse-folder");
|
|
18
|
+
exports.default = async () => {
|
|
19
|
+
const args = (0, arg_1.default)({
|
|
20
|
+
"--folder": String,
|
|
21
|
+
"--private-key": String,
|
|
22
|
+
"--entity-type": String,
|
|
23
|
+
"--pointer": [String],
|
|
24
|
+
"--content-server": String,
|
|
25
|
+
"--dry": Boolean,
|
|
26
|
+
});
|
|
27
|
+
const folder = path_1.default.resolve(args["--folder"] || process.cwd());
|
|
28
|
+
const entityType = args["--entity-type"];
|
|
29
|
+
(0, console_1.assert)(entityType, "An --entity-type must be provided");
|
|
30
|
+
const pointers = args["--pointer"];
|
|
31
|
+
(0, console_1.assert)(pointers.length > 0, "--pointer is missing");
|
|
32
|
+
console.log(`> Deploying entity in folder: ${folder}`);
|
|
33
|
+
console.log(` Entity type: ${entityType}`);
|
|
34
|
+
console.log(` Pointers: ${pointers.join(",")}`);
|
|
35
|
+
const contentUrl = (args["--content-server"] || "https://peer.decentraland.org/content").replace(/\/$/, "");
|
|
36
|
+
console.log(` Content server: ${contentUrl}`);
|
|
37
|
+
const client = new dcl_catalyst_client_1.ContentClient({ contentUrl });
|
|
38
|
+
const files = new Map();
|
|
39
|
+
console.log(` Content files:`);
|
|
40
|
+
for await (const fullPath of (0, recurse_folder_1.recurseFolder)(folder)) {
|
|
41
|
+
// NOTE: this may not work on windows machines because of path separators
|
|
42
|
+
let file = path_1.default.relative(folder, fullPath);
|
|
43
|
+
if (file.startsWith("."))
|
|
44
|
+
continue; // ignore dotfiles and git
|
|
45
|
+
console.log(` - ${file}`);
|
|
46
|
+
files.set(file, await (0, promises_1.readFile)(fullPath));
|
|
47
|
+
}
|
|
48
|
+
const metadataPath = path_1.default.join(folder, ".metadata");
|
|
49
|
+
if (!(0, fs_1.existsSync)(metadataPath)) {
|
|
50
|
+
throw new bin_1.CliError(`File ${metadataPath} doesn't exist`);
|
|
51
|
+
}
|
|
52
|
+
const metadataFile = await (0, promises_1.readFile)(metadataPath);
|
|
53
|
+
const metadata = JSON.parse(metadataFile.toString());
|
|
54
|
+
const deploymentEntity = await dcl_catalyst_client_1.DeploymentBuilder.buildEntity({
|
|
55
|
+
type: entityType,
|
|
56
|
+
pointers,
|
|
57
|
+
files,
|
|
58
|
+
metadata,
|
|
59
|
+
timestamp: new Date().getTime(),
|
|
60
|
+
});
|
|
61
|
+
console.log(` EntityId: ${deploymentEntity.entityId}`);
|
|
62
|
+
console.log(` Hashes: ${Array.from(deploymentEntity.files.keys()).join(',')}`);
|
|
63
|
+
const privateKey = args["--private-key"] || process.env.PRIVATE_KEY;
|
|
64
|
+
(0, console_1.assert)(privateKey, "Missing --private-key or PRIVATE_KEY env var");
|
|
65
|
+
const sig = (0, crypto_2.ethSign)((0, eth_connect_1.hexToBytes)(privateKey), "test");
|
|
66
|
+
const address = (0, crypto_2.recoverAddressFromEthSignature)(sig, "test");
|
|
67
|
+
console.log(` Signer address: ${address}`);
|
|
68
|
+
const messageHash = crypto_1.Authenticator.createEthereumMessageHash(deploymentEntity.entityId);
|
|
69
|
+
const signature = eth_crypto_1.default.sign(privateKey, Buffer.from(messageHash).toString("hex"));
|
|
70
|
+
const authChain = crypto_1.Authenticator.createSimpleAuthChain(deploymentEntity.entityId, address, signature);
|
|
71
|
+
console.log(` Auth chain: ${JSON.stringify(authChain)}`);
|
|
72
|
+
if (!args["--dry"]) {
|
|
73
|
+
try {
|
|
74
|
+
const result = await client.deploy({
|
|
75
|
+
entityId: deploymentEntity.entityId,
|
|
76
|
+
authChain: authChain,
|
|
77
|
+
files: deploymentEntity.files,
|
|
78
|
+
});
|
|
79
|
+
console.log("> Done. Result:");
|
|
80
|
+
console.log(result);
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
console.error(e);
|
|
84
|
+
throw new bin_1.CliError(`Error deploying entity ${deploymentEntity.entityId} on ${pointers}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=deploy-entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-entity.js","sourceRoot":"","sources":["../../src/commands/deploy-entity.ts"],"names":[],"mappings":";;;;;AAAA,0CAAsC;AACtC,4DAAkC;AAClC,6DAAiG;AACjG,wCAA2C;AAC3C,6CAAwC;AACxC,oDAAiF;AACjF,gDAAuB;AACvB,2BAA+B;AAC/B,gCAAiC;AACjC,8CAAqB;AACrB,qCAAgC;AAChC,8DAAyD;AAEzD,kBAAe,KAAK,IAAI,EAAE;IACxB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,UAAU,EAAE,MAAM;QAClB,eAAe,EAAE,MAAM;QACvB,eAA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ceRoot":"","sources":["../../src/commands/download-entity.ts"],"names":[],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"download-entity.d.ts","sourceRoot":"","sources":["../../src/commands/download-entity.ts"],"names":[],"mappings":";AAKA,wBAqBC"}
|
|
@@ -36,11 +36,11 @@ exports.default = async () => {
|
|
|
36
36
|
(0, assert_1.assert)(pointers.length > 0, "--pointer is missing");
|
|
37
37
|
const server = (args["--content-server"] || "https://peer.decentraland.org/content").replace(/\/$/, "");
|
|
38
38
|
const out = args["--out"] || process.cwd();
|
|
39
|
-
const entities = await (0, downloads_1.
|
|
39
|
+
const entities = await (0, downloads_1.getActiveEntities)(pointers, server);
|
|
40
40
|
for (const entity of entities) {
|
|
41
|
-
const destFolder = (0, path_1.resolve)(out, entity.pointers[0]) + path_1.default.sep;
|
|
41
|
+
const destFolder = (0, path_1.join)((0, path_1.resolve)(out), entity.pointers[0]) + path_1.default.sep;
|
|
42
42
|
console.log(`\nDownloading entity with pointers ${entity.pointers.join(',')} into ${destFolder}`);
|
|
43
|
-
await (0, downloads_1.downloadEntityAndMetadata)(entity, server,
|
|
43
|
+
await (0, downloads_1.downloadEntityAndMetadata)(entity, server, destFolder);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
//# sourceMappingURL=download-entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-entity.js","sourceRoot":"","sources":["../../src/commands/download-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAqB;AACrB,
|
|
1
|
+
{"version":3,"file":"download-entity.js","sourceRoot":"","sources":["../../src/commands/download-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAqB;AACrB,6CAA0C;AAC1C,8CAA0C;AAC1C,oDAAmF;AAEnF,kBAAe,KAAK,IAAI,EAAE;IACxB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM;QAC1B,OAAO,EAAE,MAAM;KAChB,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAE,CAAA;IAEnC,IAAA,eAAM,EAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,sBAAsB,CAAC,CAAA;IAEnD,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,uCAAuC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACvG,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAE1C,MAAM,QAAQ,GAAG,MAAM,IAAA,6BAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAE1D,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE;QAC7B,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,IAAA,cAAO,EAAC,GAAG,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,cAAI,CAAC,GAAG,CAAA;QACpE,OAAO,CAAC,GAAG,CAAC,sCAAsC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,UAAU,EAAE,CAAC,CAAA;QACjG,MAAM,IAAA,qCAAyB,EAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;KAC5D;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-ab-conversion.d.ts","sourceRoot":"","sources":["../../src/commands/queue-ab-conversion.ts"],"names":[],"mappings":";AAMA,wBA0DC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 schemas_1 = require("@dcl/schemas");
|
|
7
|
+
const arg_1 = __importDefault(require("arg"));
|
|
8
|
+
const assert_1 = require("../helpers/assert");
|
|
9
|
+
const asset_bundles_1 = require("../helpers/asset-bundles");
|
|
10
|
+
const downloads_1 = require("../helpers/downloads");
|
|
11
|
+
exports.default = async () => {
|
|
12
|
+
const args = (0, arg_1.default)({
|
|
13
|
+
"--cid": [String],
|
|
14
|
+
"--pointer": [String],
|
|
15
|
+
"--content-server": String,
|
|
16
|
+
"--ab-server": String,
|
|
17
|
+
"--token": String
|
|
18
|
+
});
|
|
19
|
+
const pointers = args["--pointer"] || [];
|
|
20
|
+
const cids = args["--cid"] || [];
|
|
21
|
+
const token = args["--token"];
|
|
22
|
+
const abServer = args["--ab-server"] || "https://asset-bundle-converter.decentraland.org";
|
|
23
|
+
(0, assert_1.assert)(!!token, "--token is missing");
|
|
24
|
+
(0, assert_1.assert)(pointers.length > 0 || cids.length > 0, "--pointer or --cid are required");
|
|
25
|
+
console.log(`> Parameters:`);
|
|
26
|
+
pointers.length && console.log(` Pointers: ${pointers.join(",")}`);
|
|
27
|
+
cids.length && console.log(` CIDs: ${cids.join(",")}`);
|
|
28
|
+
const contentUrl = (args["--content-server"] || "https://peer.decentraland.org/content").replace(/\/$/, "");
|
|
29
|
+
console.log(` Content server: ${contentUrl}`);
|
|
30
|
+
console.log(` Asset bundle server: ${abServer}`);
|
|
31
|
+
const entityIdsToConvert = [];
|
|
32
|
+
if (pointers.length) {
|
|
33
|
+
for (const entity of await (0, downloads_1.getActiveEntities)(pointers, contentUrl)) {
|
|
34
|
+
console.log(`> CID: ${entity.id} for ${JSON.stringify(entity.pointers)}`);
|
|
35
|
+
entityIdsToConvert.push(entity.id);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
for (const cid of cids) {
|
|
39
|
+
if (schemas_1.IPFSv1.validate(cid) || schemas_1.IPFSv2.validate(cid)) {
|
|
40
|
+
entityIdsToConvert.push(cid);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(`! Invalid CID: ${cid}. It will be ignored`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const entity of entityIdsToConvert) {
|
|
47
|
+
console.log(`> Scheduling conversion of entity ${entity}`);
|
|
48
|
+
const result = await (0, asset_bundles_1.queueConversion)(abServer, {
|
|
49
|
+
entity: {
|
|
50
|
+
entityId: entity, authChain: [
|
|
51
|
+
{
|
|
52
|
+
type: schemas_1.AuthLinkType.SIGNER,
|
|
53
|
+
payload: '0x0000000000000000000000000000000000000000',
|
|
54
|
+
signature: ''
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}, contentServerUrls: [contentUrl]
|
|
58
|
+
}, token);
|
|
59
|
+
console.log(` Result: ${JSON.stringify(result)}`);
|
|
60
|
+
}
|
|
61
|
+
console.log(`Finished!`);
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=queue-ab-conversion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-ab-conversion.js","sourceRoot":"","sources":["../../src/commands/queue-ab-conversion.ts"],"names":[],"mappings":";;;;;AAAA,0CAA2D;AAC3D,8CAAqB;AACrB,8CAA0C;AAC1C,4DAA0D;AAC1D,oDAAwD;AAExD,kBAAe,KAAK,IAAI,EAAE;IACxB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM;QAC1B,aAAa,EAAE,MAAM;QACrB,SAAS,EAAE,MAAM;KAClB,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAE,CAA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CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,gBAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAChD,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SAC7B;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,CAAA;SACzD;KACF;IAED,KAAK,MAAM,MAAM,IAAI,kBAAkB,EAAE;QACvC,OAAO,CAAC,GAAG,CAAC,qCAAqC,MAAM,EAAE,CAAC,CAAA;QAC1D,MAAM,MAAM,GAAG,MAAM,IAAA,+BAAe,EAAC,QAAQ,EAAE;YAC7C,MAAM,EAAE;gBACN,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;oBAC3B;wBACE,IAAI,EAAE,sBAAY,CAAC,MAAM;wBACzB,OAAO,EAAE,4CAA4C;wBACrD,SAAS,EAAE,EAAE;qBACd;iBACF;aACF,EAAE,iBAAiB,EAAE,CAAC,UAAU,CAAC;SACnC,EAAE,KAAK,CAAC,CAAA;QACT,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;KACnD;IAED,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;AAC1B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-bundles.d.ts","sourceRoot":"","sources":["../../src/helpers/asset-bundles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAI3E,wBAAsB,eAAe,CAAC,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBnI"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queueConversion = void 0;
|
|
4
|
+
const undici_1 = require("undici");
|
|
5
|
+
const bin_1 = require("../bin");
|
|
6
|
+
async function queueConversion(assetConverterServer, entity, token) {
|
|
7
|
+
const url = `${assetConverterServer}/queue-task`;
|
|
8
|
+
const res = await (0, undici_1.fetch)(url, {
|
|
9
|
+
method: "post",
|
|
10
|
+
body: JSON.stringify(entity),
|
|
11
|
+
headers: {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
Authorization: token
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
if (!res.ok) {
|
|
17
|
+
throw new bin_1.CliError(`! Error publishing asset bundle job. StatusCode=${res.status} Text=${await res.text()}`);
|
|
18
|
+
}
|
|
19
|
+
return await res.json();
|
|
20
|
+
}
|
|
21
|
+
exports.queueConversion = queueConversion;
|
|
22
|
+
//# sourceMappingURL=asset-bundles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-bundles.js","sourceRoot":"","sources":["../../src/helpers/asset-bundles.ts"],"names":[],"mappings":";;;AACA,mCAA8B;AAC9B,gCAAiC;AAE1B,KAAK,UAAU,eAAe,CAAC,oBAA4B,EAAE,MAAuB,EAAE,KAAa;IACxG,MAAM,GAAG,GAAG,GAAG,oBAAoB,aAAa,CAAA;IAChD,MAAM,GAAG,GAAG,MAAM,IAAA,cAAK,EAAC,GAAG,EAAE;QAC3B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC5B,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,KAAK;SACrB;KACF,CAAC,CAAA;IAGF,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;QACX,MAAM,IAAI,cAAQ,CAAC,mDAAmD,GAAG,CAAC,MAAM,SAAS,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;KAC7G;IAED,OAAO,MAAM,GAAG,CAAC,IAAI,EAAoB,CAAA;AAC3C,CAAC;AAjBD,0CAiBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity } from "@dcl/schemas";
|
|
2
2
|
export declare function downloadEntity(entity: Entity, server: string, destFolder: string): Promise<void>;
|
|
3
3
|
export declare const downloadFile: (server: string, cid: string, filepath: string) => Promise<void>;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function getActiveEntities(pointers: string[], sourceServer: string): Promise<Entity[]>;
|
|
5
5
|
export declare function downloadEntityAndMetadata(entity: Entity, server: string, destFolder: string): Promise<void>;
|
|
6
6
|
//# sourceMappingURL=downloads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloads.d.ts","sourceRoot":"","sources":["../../src/helpers/downloads.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAYtF;AAED,eAAO,MAAM,YAAY,WAA2B,MAAM,OAAO,MAAM,YAAY,MAAM,kBAMxF,CAAA;AAED,wBAAsB,
|
|
1
|
+
{"version":3,"file":"downloads.d.ts","sourceRoot":"","sources":["../../src/helpers/downloads.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAYtF;AAED,eAAO,MAAM,YAAY,WAA2B,MAAM,OAAO,MAAM,YAAY,MAAM,kBAMxF,CAAA;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAenG;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAKjG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.downloadEntityAndMetadata = exports.
|
|
3
|
+
exports.downloadEntityAndMetadata = exports.getActiveEntities = exports.downloadFile = exports.downloadEntity = void 0;
|
|
4
4
|
const undici_1 = require("undici");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const promises_1 = require("fs/promises");
|
|
@@ -25,7 +25,7 @@ const downloadFile = async function (server, cid, filepath) {
|
|
|
25
25
|
await (0, promises_1.writeFile)(filepath, Buffer.from(data));
|
|
26
26
|
};
|
|
27
27
|
exports.downloadFile = downloadFile;
|
|
28
|
-
async function
|
|
28
|
+
async function getActiveEntities(pointers, sourceServer) {
|
|
29
29
|
const url = `${sourceServer}/entities/active`;
|
|
30
30
|
const res = await (0, undici_1.fetch)(url, {
|
|
31
31
|
method: "post",
|
|
@@ -38,7 +38,7 @@ async function getEntities(pointers, sourceServer) {
|
|
|
38
38
|
}
|
|
39
39
|
return JSON.parse(response);
|
|
40
40
|
}
|
|
41
|
-
exports.
|
|
41
|
+
exports.getActiveEntities = getActiveEntities;
|
|
42
42
|
async function downloadEntityAndMetadata(entity, server, destFolder) {
|
|
43
43
|
await downloadEntity(entity, server, destFolder);
|
|
44
44
|
await (0, promises_1.writeFile)((0, path_1.resolve)(destFolder, ".metadata"), JSON.stringify(entity.metadata, null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloads.js","sourceRoot":"","sources":["../../src/helpers/downloads.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,+BAAuC;AACvC,0CAA8C;AAC9C,2BAA+B;AAGxB,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,MAAc,EAAE,UAAkB;IACrF,MAAM,IAAA,gBAAK,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IA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,GAAG,CAAC,EAAE,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,0CAA0C,GAAG,QAAQ,CAAC,CAAA;KACvE;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;AAC7B,CAAC;AAfD,8CAeC;AAEM,KAAK,UAAU,yBAAyB,CAAC,MAAc,EAAE,MAAc,EAAE,UAAkB;IAChG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;IAEhD,MAAM,IAAA,oBAAS,EAAC,IAAA,cAAO,EAAC,UAAU,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAC3F,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,UAAU,CAAC,CAAA;AACrD,CAAC;AALD,8DAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurse-folder.d.ts","sourceRoot":"","sources":["../../src/helpers/recurse-folder.ts"],"names":[],"mappings":"AAGA,wBAAuB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAO1E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.recurseFolder = void 0;
|
|
23
|
+
const fs = __importStar(require("fs/promises"));
|
|
24
|
+
const path = __importStar(require("path"));
|
|
25
|
+
async function* recurseFolder(folder) {
|
|
26
|
+
const dir = await fs.opendir(folder, { bufferSize: 4000 });
|
|
27
|
+
for await (const entry of dir) {
|
|
28
|
+
const resolved = path.resolve(folder, entry.name);
|
|
29
|
+
if (entry.isDirectory())
|
|
30
|
+
yield* recurseFolder(resolved);
|
|
31
|
+
else
|
|
32
|
+
yield resolved;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.recurseFolder = recurseFolder;
|
|
36
|
+
//# sourceMappingURL=recurse-folder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurse-folder.js","sourceRoot":"","sources":["../../src/helpers/recurse-folder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAiC;AACjC,2CAA4B;AAErB,KAAK,SAAS,CAAC,CAAC,aAAa,CAAC,MAAc;IACjD,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1D,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACjD,IAAI,KAAK,CAAC,WAAW,EAAE;YAAE,KAAK,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;;YAClD,MAAM,QAAQ,CAAA;KACpB;AACH,CAAC;AAPD,sCAOC"}
|
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-4128233430.commit-8f0a990",
|
|
4
4
|
"description": "base component",
|
|
5
5
|
"bin": "dist/bin.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,13 +33,16 @@
|
|
|
33
33
|
"typescript": "^4.3.5"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dcl/
|
|
36
|
+
"@dcl/crypto": "^3.2.4",
|
|
37
|
+
"@dcl/schemas": "^6.7.0",
|
|
37
38
|
"arg": "^5.0.2",
|
|
39
|
+
"dcl-catalyst-client": "^14.0.6",
|
|
40
|
+
"eth-crypto": "^2.5.0",
|
|
38
41
|
"simple-git": "^3.14.0",
|
|
39
42
|
"undici": "^5.15.0"
|
|
40
43
|
},
|
|
41
44
|
"files": [
|
|
42
45
|
"dist"
|
|
43
46
|
],
|
|
44
|
-
"commit": "
|
|
47
|
+
"commit": "8f0a990a8048c1ac891ee272a992bdf4818ffb0c"
|
|
45
48
|
}
|