@extension.dev/deploy 0.2.0 → 0.2.2
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 +50 -50
- package/dist/module.js +53 -25
- package/dist/module.mjs +52 -25
- package/dist/src/chrome.d.ts.map +1 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/deploy.d.ts.map +1 -1
- package/dist/src/edge.d.ts.map +1 -1
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/utils/log.d.ts +12 -4
- package/dist/src/utils/log.d.ts.map +1 -1
- package/dist/src/watch.d.ts.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -67,44 +67,44 @@ Run `extension-deploy --help` for the full list of flags.
|
|
|
67
67
|
|
|
68
68
|
### Global flags
|
|
69
69
|
|
|
70
|
-
| Flag
|
|
71
|
-
|
|
|
70
|
+
| Flag | Description |
|
|
71
|
+
| ----------- | ------------------------------------------------------------- |
|
|
72
72
|
| `--dry-run` | Verify auth and validate ZIPs without uploading or publishing |
|
|
73
|
-
| `--help`
|
|
73
|
+
| `--help` | Show the help message |
|
|
74
74
|
|
|
75
75
|
### Chrome Web Store
|
|
76
76
|
|
|
77
|
-
| Flag
|
|
78
|
-
|
|
|
79
|
-
| `--chrome-zip <path>`
|
|
80
|
-
| `--chrome-extension-id <id>`
|
|
81
|
-
| `--chrome-client-id <id>`
|
|
82
|
-
| `--chrome-client-secret <secret>`
|
|
83
|
-
| `--chrome-refresh-token <token>`
|
|
84
|
-
| `--chrome-publish-target <target>` | `CHROME_PUBLISH_TARGET`
|
|
85
|
-
| `--chrome-deploy-percentage <n>`
|
|
86
|
-
| `--chrome-review-exemption`
|
|
87
|
-
| `--chrome-skip-submit-review`
|
|
77
|
+
| Flag | Env var | Description |
|
|
78
|
+
| ---------------------------------- | --------------------------- | --------------------------------- |
|
|
79
|
+
| `--chrome-zip <path>` | `CHROME_ZIP` | Path to the extension ZIP file |
|
|
80
|
+
| `--chrome-extension-id <id>` | `CHROME_EXTENSION_ID` | Chrome Web Store extension ID |
|
|
81
|
+
| `--chrome-client-id <id>` | `CHROME_CLIENT_ID` | OAuth2 client ID |
|
|
82
|
+
| `--chrome-client-secret <secret>` | `CHROME_CLIENT_SECRET` | OAuth2 client secret |
|
|
83
|
+
| `--chrome-refresh-token <token>` | `CHROME_REFRESH_TOKEN` | OAuth2 refresh token |
|
|
84
|
+
| `--chrome-publish-target <target>` | `CHROME_PUBLISH_TARGET` | `"default"` or `"trustedTesters"` |
|
|
85
|
+
| `--chrome-deploy-percentage <n>` | `CHROME_DEPLOY_PERCENTAGE` | Staged rollout percentage (1-100) |
|
|
86
|
+
| `--chrome-review-exemption` | `CHROME_REVIEW_EXEMPTION` | Request expedited review |
|
|
87
|
+
| `--chrome-skip-submit-review` | `CHROME_SKIP_SUBMIT_REVIEW` | Upload only, skip publish step |
|
|
88
88
|
|
|
89
89
|
### Firefox AMO
|
|
90
90
|
|
|
91
|
-
| Flag
|
|
92
|
-
|
|
|
93
|
-
| `--firefox-zip <path>`
|
|
94
|
-
| `--firefox-sources-zip <path>`
|
|
95
|
-
| `--firefox-extension-id <id>`
|
|
96
|
-
| `--firefox-jwt-issuer <issuer>` | `FIREFOX_JWT_ISSUER`
|
|
97
|
-
| `--firefox-jwt-secret <secret>` | `FIREFOX_JWT_SECRET`
|
|
98
|
-
| `--firefox-channel <channel>`
|
|
91
|
+
| Flag | Env var | Description |
|
|
92
|
+
| ------------------------------- | ---------------------- | ------------------------------------------ |
|
|
93
|
+
| `--firefox-zip <path>` | `FIREFOX_ZIP` | Path to the extension ZIP file |
|
|
94
|
+
| `--firefox-sources-zip <path>` | `FIREFOX_SOURCES_ZIP` | Path to sources ZIP (optional, for review) |
|
|
95
|
+
| `--firefox-extension-id <id>` | `FIREFOX_EXTENSION_ID` | Addon GUID (`{uuid}`) or email-style ID |
|
|
96
|
+
| `--firefox-jwt-issuer <issuer>` | `FIREFOX_JWT_ISSUER` | AMO JWT issuer (API key) |
|
|
97
|
+
| `--firefox-jwt-secret <secret>` | `FIREFOX_JWT_SECRET` | AMO JWT secret |
|
|
98
|
+
| `--firefox-channel <channel>` | `FIREFOX_CHANNEL` | `"listed"` or `"unlisted"` |
|
|
99
99
|
|
|
100
100
|
### Edge Partner Center
|
|
101
101
|
|
|
102
|
-
| Flag
|
|
103
|
-
|
|
|
104
|
-
| `--edge-zip <path>`
|
|
105
|
-
| `--edge-product-id <id>`
|
|
106
|
-
| `--edge-client-id <id>`
|
|
107
|
-
| `--edge-api-key <key>`
|
|
102
|
+
| Flag | Env var | Description |
|
|
103
|
+
| --------------------------- | ------------------------- | ------------------------------ |
|
|
104
|
+
| `--edge-zip <path>` | `EDGE_ZIP` | Path to the extension ZIP file |
|
|
105
|
+
| `--edge-product-id <id>` | `EDGE_PRODUCT_ID` | Partner Center product ID |
|
|
106
|
+
| `--edge-client-id <id>` | `EDGE_CLIENT_ID` | Partner Center client ID |
|
|
107
|
+
| `--edge-api-key <key>` | `EDGE_API_KEY` | Partner Center API key (v1.1) |
|
|
108
108
|
| `--edge-skip-submit-review` | `EDGE_SKIP_SUBMIT_REVIEW` | Upload only, skip publish step |
|
|
109
109
|
|
|
110
110
|
### Environment variables
|
|
@@ -169,30 +169,30 @@ Deploys to all configured stores in parallel. Only stores with a config object a
|
|
|
169
169
|
|
|
170
170
|
**`DeployConfig`**
|
|
171
171
|
|
|
172
|
-
| Field
|
|
173
|
-
|
|
|
174
|
-
| `dryRun`
|
|
175
|
-
| `chrome`
|
|
176
|
-
| `firefox` | `FirefoxOptions` | No
|
|
177
|
-
| `edge`
|
|
172
|
+
| Field | Type | Required | Description |
|
|
173
|
+
| --------- | ---------------- | -------- | ---------------------------------------------- |
|
|
174
|
+
| `dryRun` | `boolean` | No | Verify auth without uploading. Default `false` |
|
|
175
|
+
| `chrome` | `ChromeOptions` | No | Chrome Web Store config |
|
|
176
|
+
| `firefox` | `FirefoxOptions` | No | Firefox AMO config |
|
|
177
|
+
| `edge` | `EdgeOptions` | No | Edge Partner Center config |
|
|
178
178
|
|
|
179
179
|
**`DeployResult`**
|
|
180
180
|
|
|
181
|
-
| Field
|
|
182
|
-
|
|
|
183
|
-
| `dryRun`
|
|
184
|
-
| `success` | `boolean`
|
|
185
|
-
| `stores`
|
|
181
|
+
| Field | Type | Description |
|
|
182
|
+
| --------- | --------------- | ------------------------------ |
|
|
183
|
+
| `dryRun` | `boolean` | Whether this was a dry run |
|
|
184
|
+
| `success` | `boolean` | `true` if all stores succeeded |
|
|
185
|
+
| `stores` | `StoreResult[]` | Per-store results |
|
|
186
186
|
|
|
187
187
|
**`StoreResult`**
|
|
188
188
|
|
|
189
|
-
| Field
|
|
190
|
-
|
|
|
191
|
-
| `store`
|
|
192
|
-
| `success`
|
|
193
|
-
| `status`
|
|
194
|
-
| `error`
|
|
195
|
-
| `duration` | `number`
|
|
189
|
+
| Field | Type | Description |
|
|
190
|
+
| ---------- | ---------------------------------------------------- | ---------------------------- |
|
|
191
|
+
| `store` | `"chrome" \| "firefox" \| "edge"` | Store identifier |
|
|
192
|
+
| `success` | `boolean` | Whether submission succeeded |
|
|
193
|
+
| `status` | `"dry_run" \| "submitted" \| "uploaded" \| "failed"` | Result status |
|
|
194
|
+
| `error` | `string?` | Error message on failure |
|
|
195
|
+
| `duration` | `number` | Duration in milliseconds |
|
|
196
196
|
|
|
197
197
|
### Validation schemas
|
|
198
198
|
|
|
@@ -230,10 +230,10 @@ import {
|
|
|
230
230
|
|
|
231
231
|
## Exit codes
|
|
232
232
|
|
|
233
|
-
| Code | Meaning
|
|
234
|
-
|
|
|
235
|
-
| `0`
|
|
236
|
-
| `1`
|
|
233
|
+
| Code | Meaning |
|
|
234
|
+
| ---- | ---------------------------------------------------------------- |
|
|
235
|
+
| `0` | All configured stores succeeded |
|
|
236
|
+
| `1` | One or more stores failed, or a validation/config error occurred |
|
|
237
237
|
|
|
238
238
|
## Local development
|
|
239
239
|
|
package/dist/module.js
CHANGED
|
@@ -211,15 +211,34 @@ function formatBytes(bytes) {
|
|
|
211
211
|
if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
212
212
|
return `${(bytes / 1048576).toFixed(2)} MB`;
|
|
213
213
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
const external_pintor_namespaceObject = require("pintor");
|
|
215
|
+
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_namespaceObject);
|
|
216
|
+
const colors = external_pintor_default();
|
|
217
|
+
function getLoggingPrefix(type) {
|
|
218
|
+
if ("error" === type) return colors.red("ERROR");
|
|
219
|
+
if ("warn" === type) return colors.brightYellow("\u23F5\u23F5\u23F5");
|
|
220
|
+
if ("info" === type) return colors.gray("\u23F5\u23F5\u23F5");
|
|
221
|
+
return colors.green("\u23F5\u23F5\u23F5");
|
|
217
222
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
223
|
+
function scopeTag(scope) {
|
|
224
|
+
return colors.blue(scope);
|
|
225
|
+
}
|
|
226
|
+
function labelLine(key, value) {
|
|
227
|
+
return ` ${colors.gray(key.toUpperCase())} ${colors.underline(String(value))}`;
|
|
228
|
+
}
|
|
229
|
+
function log(scope, message) {
|
|
230
|
+
console.log(`${getLoggingPrefix("info")} ${scopeTag(scope)} ${message}`);
|
|
231
|
+
}
|
|
232
|
+
function logSuccess(scope, message) {
|
|
233
|
+
console.log(`${getLoggingPrefix("success")} ${scopeTag(scope)} ${message}`);
|
|
234
|
+
}
|
|
235
|
+
function logError(scope, message) {
|
|
236
|
+
console.error(`${getLoggingPrefix("error")} ${scopeTag(scope)} ${message}`);
|
|
237
|
+
}
|
|
238
|
+
function logDryStep(scope, step, details) {
|
|
239
|
+
console.log(`${getLoggingPrefix("info")} ${scopeTag(scope)} ${colors.gray("DRY RUN")} ${step}`);
|
|
221
240
|
if (details) {
|
|
222
|
-
for (const [key, value] of Object.entries(details))if (null != value) console.log(
|
|
241
|
+
for (const [key, value] of Object.entries(details))if (null != value) console.log(labelLine(key, value));
|
|
223
242
|
}
|
|
224
243
|
}
|
|
225
244
|
const CWS_OAUTH_URL = "https://oauth2.googleapis.com/token";
|
|
@@ -757,8 +776,9 @@ async function deploy(config) {
|
|
|
757
776
|
});
|
|
758
777
|
}
|
|
759
778
|
if (0 === jobs.length) throw new Error("No stores configured. Provide at least one store to deploy to.\n\nEach store is activated by providing its ZIP path:\n Chrome: --chrome-zip <path> or CHROME_ZIP=<path>\n Firefox: --firefox-zip <path> or FIREFOX_ZIP=<path>\n Edge: --edge-zip <path> or EDGE_ZIP=<path>\n\nRun extension-deploy --help for all options, or create a .env.submit file.");
|
|
760
|
-
|
|
761
|
-
|
|
779
|
+
console.log("");
|
|
780
|
+
dryRun ? log("deploy", "Dry run enabled \u2014 will verify auth without uploading") : log("deploy", "Deploying extension...");
|
|
781
|
+
console.log("");
|
|
762
782
|
const settled = await Promise.allSettled(jobs.map(async ({ key, run })=>{
|
|
763
783
|
const start = Date.now();
|
|
764
784
|
try {
|
|
@@ -789,11 +809,15 @@ async function deploy(config) {
|
|
|
789
809
|
duration: 0
|
|
790
810
|
});
|
|
791
811
|
const success = stores.every((s)=>s.success);
|
|
792
|
-
console.log("
|
|
812
|
+
console.log("");
|
|
813
|
+
log("deploy", "Summary");
|
|
793
814
|
for (const s of stores){
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
815
|
+
const line = `${colors.gray(s.store)} ${colors.underline(s.status)} ` + colors.gray(`(${s.duration}ms)`);
|
|
816
|
+
if (s.success) logSuccess("deploy", line);
|
|
817
|
+
else {
|
|
818
|
+
logError("deploy", line);
|
|
819
|
+
if (s.error) console.error(` ${colors.red(s.error)}`);
|
|
820
|
+
}
|
|
797
821
|
}
|
|
798
822
|
console.log("");
|
|
799
823
|
return {
|
|
@@ -963,7 +987,7 @@ const CHROME_SCOPE = "https://www.googleapis.com/auth/chromewebstore";
|
|
|
963
987
|
async function runInit(deps, options = {}) {
|
|
964
988
|
const { io } = deps;
|
|
965
989
|
io.log("");
|
|
966
|
-
io.log("extension-deploy
|
|
990
|
+
io.log(`${colors.green("\u23F5\u23F5\u23F5")} ${colors.blue("init")} ${colors.underline("extension-deploy \u2014 set up store credentials")}`);
|
|
967
991
|
io.log("");
|
|
968
992
|
io.log("This wizard walks you through creating credentials for each store and");
|
|
969
993
|
io.log("writes them to a .env.submit file. Press Ctrl+C at any time to abort.");
|
|
@@ -978,7 +1002,7 @@ async function runInit(deps, options = {}) {
|
|
|
978
1002
|
const verified = {};
|
|
979
1003
|
for (const store of stores){
|
|
980
1004
|
io.log("");
|
|
981
|
-
io.log(
|
|
1005
|
+
io.log(colors.underline(colors.blue(labelFor(store))));
|
|
982
1006
|
io.log("");
|
|
983
1007
|
if ("chrome" === store) {
|
|
984
1008
|
const creds = await collectChromeCredentials(deps);
|
|
@@ -1035,9 +1059,9 @@ async function runInit(deps, options = {}) {
|
|
|
1035
1059
|
}
|
|
1036
1060
|
if (wrote) {
|
|
1037
1061
|
io.log("");
|
|
1038
|
-
io.log(
|
|
1062
|
+
io.log(`${colors.green("\u23F5\u23F5\u23F5")} ${colors.blue("init")} Wrote ${colors.underline(envPath)}`);
|
|
1039
1063
|
io.log("");
|
|
1040
|
-
io.log("Next steps:");
|
|
1064
|
+
io.log(colors.gray("Next steps:"));
|
|
1041
1065
|
io.log(" - Add .env.submit to .gitignore if it isn't already (it contains secrets).");
|
|
1042
1066
|
io.log(" - Run `extension-deploy --dry-run` to sanity-check the full submit flow.");
|
|
1043
1067
|
io.log("");
|
|
@@ -1176,8 +1200,8 @@ function normalizeVerify(result) {
|
|
|
1176
1200
|
};
|
|
1177
1201
|
}
|
|
1178
1202
|
function logVerify(io, store, record) {
|
|
1179
|
-
const marker = record.ok ? "
|
|
1180
|
-
io.log(` ${marker} verify ${store}: ${record.message}`);
|
|
1203
|
+
const marker = record.ok ? `[${colors.green("ok")}]` : `[${colors.red("fail")}]`;
|
|
1204
|
+
io.log(` ${marker} verify ${colors.blue(store)}: ${record.message}`);
|
|
1181
1205
|
}
|
|
1182
1206
|
function resolveEnvPath(cwd, outputPath) {
|
|
1183
1207
|
const target = outputPath ?? ".env.submit";
|
|
@@ -1421,19 +1445,23 @@ async function main() {
|
|
|
1421
1445
|
if (flags.outputJson) writeJsonOutput(flags.outputJson, result);
|
|
1422
1446
|
if (!result.success) process.exit(1);
|
|
1423
1447
|
} catch (err) {
|
|
1424
|
-
|
|
1448
|
+
logError("deploy", err instanceof Error ? err.message : String(err));
|
|
1425
1449
|
process.exit(1);
|
|
1426
1450
|
}
|
|
1427
1451
|
}
|
|
1428
1452
|
async function runWatch(flags) {
|
|
1429
1453
|
const store = flags.watchStore;
|
|
1430
1454
|
if (!store) {
|
|
1431
|
-
|
|
1455
|
+
logError("watch", "One of --chrome, --firefox, or --edge must be provided.");
|
|
1432
1456
|
process.exit(2);
|
|
1433
1457
|
}
|
|
1434
1458
|
const onEvent = (event)=>{
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1459
|
+
const parts = [
|
|
1460
|
+
colors.underline(event.status)
|
|
1461
|
+
];
|
|
1462
|
+
if (event.nativeStatus) parts.push(colors.gray(`(${event.nativeStatus})`));
|
|
1463
|
+
if (event.message) parts.push(`\u{2014} ${event.message}`);
|
|
1464
|
+
log(event.store, parts.join(" "));
|
|
1437
1465
|
};
|
|
1438
1466
|
const pollIntervalMs = (flags.watchInterval ?? 60) * 1000;
|
|
1439
1467
|
const timeoutMs = (flags.watchTimeout ?? 3600) * 1000;
|
|
@@ -1468,7 +1496,7 @@ async function runWatch(flags) {
|
|
|
1468
1496
|
onEvent
|
|
1469
1497
|
});
|
|
1470
1498
|
} catch (err) {
|
|
1471
|
-
|
|
1499
|
+
logError("watch", err instanceof Error ? err.message : String(err));
|
|
1472
1500
|
process.exit(1);
|
|
1473
1501
|
}
|
|
1474
1502
|
if (flags.outputJson) writeJsonOutput(flags.outputJson, terminal);
|
|
@@ -1499,7 +1527,7 @@ async function runInitCommand(flags) {
|
|
|
1499
1527
|
force: flags.initForce
|
|
1500
1528
|
});
|
|
1501
1529
|
} catch (err) {
|
|
1502
|
-
|
|
1530
|
+
logError("deploy", err instanceof Error ? err.message : String(err));
|
|
1503
1531
|
process.exit(1);
|
|
1504
1532
|
} finally{
|
|
1505
1533
|
io.dispose();
|
package/dist/module.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import external_node_fs_default from "node:fs";
|
|
|
2
2
|
import external_node_path_default from "node:path";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import promises_default from "node:fs/promises";
|
|
5
|
+
import external_pintor_default from "pintor";
|
|
5
6
|
import external_node_crypto_default from "node:crypto";
|
|
6
7
|
import external_node_readline_default from "node:readline";
|
|
7
8
|
const chromeOptionsSchema = z.object({
|
|
@@ -157,15 +158,32 @@ function formatBytes(bytes) {
|
|
|
157
158
|
if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
158
159
|
return `${(bytes / 1048576).toFixed(2)} MB`;
|
|
159
160
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
const colors = external_pintor_default;
|
|
162
|
+
function getLoggingPrefix(type) {
|
|
163
|
+
if ("error" === type) return colors.red("ERROR");
|
|
164
|
+
if ("warn" === type) return colors.brightYellow("\u23F5\u23F5\u23F5");
|
|
165
|
+
if ("info" === type) return colors.gray("\u23F5\u23F5\u23F5");
|
|
166
|
+
return colors.green("\u23F5\u23F5\u23F5");
|
|
163
167
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
|
|
168
|
+
function scopeTag(scope) {
|
|
169
|
+
return colors.blue(scope);
|
|
170
|
+
}
|
|
171
|
+
function labelLine(key, value) {
|
|
172
|
+
return ` ${colors.gray(key.toUpperCase())} ${colors.underline(String(value))}`;
|
|
173
|
+
}
|
|
174
|
+
function log(scope, message) {
|
|
175
|
+
console.log(`${getLoggingPrefix("info")} ${scopeTag(scope)} ${message}`);
|
|
176
|
+
}
|
|
177
|
+
function logSuccess(scope, message) {
|
|
178
|
+
console.log(`${getLoggingPrefix("success")} ${scopeTag(scope)} ${message}`);
|
|
179
|
+
}
|
|
180
|
+
function logError(scope, message) {
|
|
181
|
+
console.error(`${getLoggingPrefix("error")} ${scopeTag(scope)} ${message}`);
|
|
182
|
+
}
|
|
183
|
+
function logDryStep(scope, step, details) {
|
|
184
|
+
console.log(`${getLoggingPrefix("info")} ${scopeTag(scope)} ${colors.gray("DRY RUN")} ${step}`);
|
|
167
185
|
if (details) {
|
|
168
|
-
for (const [key, value] of Object.entries(details))if (null != value) console.log(
|
|
186
|
+
for (const [key, value] of Object.entries(details))if (null != value) console.log(labelLine(key, value));
|
|
169
187
|
}
|
|
170
188
|
}
|
|
171
189
|
const CWS_OAUTH_URL = "https://oauth2.googleapis.com/token";
|
|
@@ -701,8 +719,9 @@ async function deploy(config) {
|
|
|
701
719
|
});
|
|
702
720
|
}
|
|
703
721
|
if (0 === jobs.length) throw new Error("No stores configured. Provide at least one store to deploy to.\n\nEach store is activated by providing its ZIP path:\n Chrome: --chrome-zip <path> or CHROME_ZIP=<path>\n Firefox: --firefox-zip <path> or FIREFOX_ZIP=<path>\n Edge: --edge-zip <path> or EDGE_ZIP=<path>\n\nRun extension-deploy --help for all options, or create a .env.submit file.");
|
|
704
|
-
|
|
705
|
-
|
|
722
|
+
console.log("");
|
|
723
|
+
dryRun ? log("deploy", "Dry run enabled \u2014 will verify auth without uploading") : log("deploy", "Deploying extension...");
|
|
724
|
+
console.log("");
|
|
706
725
|
const settled = await Promise.allSettled(jobs.map(async ({ key, run })=>{
|
|
707
726
|
const start = Date.now();
|
|
708
727
|
try {
|
|
@@ -733,11 +752,15 @@ async function deploy(config) {
|
|
|
733
752
|
duration: 0
|
|
734
753
|
});
|
|
735
754
|
const success = stores.every((s)=>s.success);
|
|
736
|
-
console.log("
|
|
755
|
+
console.log("");
|
|
756
|
+
log("deploy", "Summary");
|
|
737
757
|
for (const s of stores){
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
|
|
758
|
+
const line = `${colors.gray(s.store)} ${colors.underline(s.status)} ` + colors.gray(`(${s.duration}ms)`);
|
|
759
|
+
if (s.success) logSuccess("deploy", line);
|
|
760
|
+
else {
|
|
761
|
+
logError("deploy", line);
|
|
762
|
+
if (s.error) console.error(` ${colors.red(s.error)}`);
|
|
763
|
+
}
|
|
741
764
|
}
|
|
742
765
|
console.log("");
|
|
743
766
|
return {
|
|
@@ -907,7 +930,7 @@ const CHROME_SCOPE = "https://www.googleapis.com/auth/chromewebstore";
|
|
|
907
930
|
async function runInit(deps, options = {}) {
|
|
908
931
|
const { io } = deps;
|
|
909
932
|
io.log("");
|
|
910
|
-
io.log("extension-deploy
|
|
933
|
+
io.log(`${colors.green("\u23F5\u23F5\u23F5")} ${colors.blue("init")} ${colors.underline("extension-deploy \u2014 set up store credentials")}`);
|
|
911
934
|
io.log("");
|
|
912
935
|
io.log("This wizard walks you through creating credentials for each store and");
|
|
913
936
|
io.log("writes them to a .env.submit file. Press Ctrl+C at any time to abort.");
|
|
@@ -922,7 +945,7 @@ async function runInit(deps, options = {}) {
|
|
|
922
945
|
const verified = {};
|
|
923
946
|
for (const store of stores){
|
|
924
947
|
io.log("");
|
|
925
|
-
io.log(
|
|
948
|
+
io.log(colors.underline(colors.blue(labelFor(store))));
|
|
926
949
|
io.log("");
|
|
927
950
|
if ("chrome" === store) {
|
|
928
951
|
const creds = await collectChromeCredentials(deps);
|
|
@@ -979,9 +1002,9 @@ async function runInit(deps, options = {}) {
|
|
|
979
1002
|
}
|
|
980
1003
|
if (wrote) {
|
|
981
1004
|
io.log("");
|
|
982
|
-
io.log(
|
|
1005
|
+
io.log(`${colors.green("\u23F5\u23F5\u23F5")} ${colors.blue("init")} Wrote ${colors.underline(envPath)}`);
|
|
983
1006
|
io.log("");
|
|
984
|
-
io.log("Next steps:");
|
|
1007
|
+
io.log(colors.gray("Next steps:"));
|
|
985
1008
|
io.log(" - Add .env.submit to .gitignore if it isn't already (it contains secrets).");
|
|
986
1009
|
io.log(" - Run `extension-deploy --dry-run` to sanity-check the full submit flow.");
|
|
987
1010
|
io.log("");
|
|
@@ -1120,8 +1143,8 @@ function normalizeVerify(result) {
|
|
|
1120
1143
|
};
|
|
1121
1144
|
}
|
|
1122
1145
|
function logVerify(io, store, record) {
|
|
1123
|
-
const marker = record.ok ? "
|
|
1124
|
-
io.log(` ${marker} verify ${store}: ${record.message}`);
|
|
1146
|
+
const marker = record.ok ? `[${colors.green("ok")}]` : `[${colors.red("fail")}]`;
|
|
1147
|
+
io.log(` ${marker} verify ${colors.blue(store)}: ${record.message}`);
|
|
1125
1148
|
}
|
|
1126
1149
|
function resolveEnvPath(cwd, outputPath) {
|
|
1127
1150
|
const target = outputPath ?? ".env.submit";
|
|
@@ -1363,19 +1386,23 @@ async function main() {
|
|
|
1363
1386
|
if (flags.outputJson) writeJsonOutput(flags.outputJson, result);
|
|
1364
1387
|
if (!result.success) process.exit(1);
|
|
1365
1388
|
} catch (err) {
|
|
1366
|
-
|
|
1389
|
+
logError("deploy", err instanceof Error ? err.message : String(err));
|
|
1367
1390
|
process.exit(1);
|
|
1368
1391
|
}
|
|
1369
1392
|
}
|
|
1370
1393
|
async function runWatch(flags) {
|
|
1371
1394
|
const store = flags.watchStore;
|
|
1372
1395
|
if (!store) {
|
|
1373
|
-
|
|
1396
|
+
logError("watch", "One of --chrome, --firefox, or --edge must be provided.");
|
|
1374
1397
|
process.exit(2);
|
|
1375
1398
|
}
|
|
1376
1399
|
const onEvent = (event)=>{
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1400
|
+
const parts = [
|
|
1401
|
+
colors.underline(event.status)
|
|
1402
|
+
];
|
|
1403
|
+
if (event.nativeStatus) parts.push(colors.gray(`(${event.nativeStatus})`));
|
|
1404
|
+
if (event.message) parts.push(`\u{2014} ${event.message}`);
|
|
1405
|
+
log(event.store, parts.join(" "));
|
|
1379
1406
|
};
|
|
1380
1407
|
const pollIntervalMs = (flags.watchInterval ?? 60) * 1000;
|
|
1381
1408
|
const timeoutMs = (flags.watchTimeout ?? 3600) * 1000;
|
|
@@ -1410,7 +1437,7 @@ async function runWatch(flags) {
|
|
|
1410
1437
|
onEvent
|
|
1411
1438
|
});
|
|
1412
1439
|
} catch (err) {
|
|
1413
|
-
|
|
1440
|
+
logError("watch", err instanceof Error ? err.message : String(err));
|
|
1414
1441
|
process.exit(1);
|
|
1415
1442
|
}
|
|
1416
1443
|
if (flags.outputJson) writeJsonOutput(flags.outputJson, terminal);
|
|
@@ -1441,7 +1468,7 @@ async function runInitCommand(flags) {
|
|
|
1441
1468
|
force: flags.initForce
|
|
1442
1469
|
});
|
|
1443
1470
|
} catch (err) {
|
|
1444
|
-
|
|
1471
|
+
logError("deploy", err instanceof Error ? err.message : String(err));
|
|
1445
1472
|
process.exit(1);
|
|
1446
1473
|
} finally{
|
|
1447
1474
|
io.dispose();
|
package/dist/src/chrome.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../src/chrome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../src/chrome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAID,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA+ED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,aAAa,CACjC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,oBAAoB,CAAC,CA2D/B;AAID,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CACpC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAa5B;AAID,wBAAsB,uBAAuB,CAAC,MAAM,EAAE;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkD9B"}
|
package/dist/src/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAuFzC,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiE3D;AAiCD,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAiC1C"}
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhE,wBAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,YAAY,CAiEpE;AAuCD,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB/C;AAiBD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACrC,8CAA8C;IAC9C,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1C,4EAA4E;IAC5E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,OAAO,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,cAAc,EAAE,OAAO,CAAC;IACxB,2DAA2D;IAC3D,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/src/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EAGb,MAAM,SAAS,CAAC;AAOjB,wBAAsB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CA0GxE"}
|
package/dist/src/edge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/edge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MA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E,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAKtC;AAID,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAuE5B"}
|
package/dist/src/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAA2B,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAA4B,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAyB,MAAM,QAAQ,CAAC;AAGtE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,MAAM;IACrB,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS;QAAE,KAAK,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,GACzD,OAAO,CAAC,YAAY,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iB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,iBAAiB,CAAC,CAsC5B;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClB;AA8BD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,kBAAkB,CAAC,CAsB7B;AAID,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,eAAe,CAAC,CAkB1B"}
|
package/dist/src/utils/log.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { StoreKey } from "../types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
2
|
+
type ColorFn = (text: string) => string;
|
|
3
|
+
type ColorName = "red" | "blue" | "gray" | "green" | "yellow" | "brightYellow" | "underline";
|
|
4
|
+
declare const colors: Record<ColorName, ColorFn>;
|
|
5
|
+
export type LogScope = StoreKey | "deploy" | "watch";
|
|
6
|
+
export declare function log(scope: LogScope, message: string): void;
|
|
7
|
+
export declare function logSuccess(scope: LogScope, message: string): void;
|
|
8
|
+
export declare function logWarn(scope: LogScope, message: string): void;
|
|
9
|
+
export declare function logError(scope: LogScope, message: string): void;
|
|
10
|
+
export declare function logDryRun(scope: LogScope, message: string): void;
|
|
11
|
+
export declare function logDryStep(scope: LogScope, step: string, details?: Record<string, unknown>): void;
|
|
12
|
+
export declare function logLabelLine(key: string, value: unknown): string;
|
|
13
|
+
export { colors };
|
|
6
14
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/utils/log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/utils/log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AACxC,KAAK,SAAS,GACV,KAAK,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,cAAc,GACd,WAAW,CAAC;AAEhB,QAAA,MAAM,MAAM,EAAwB,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAE/D,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAiBrD,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhE;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CAUN;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhE;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/src/watch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAY,UAAU,EAAe,MAAM,SAAS,CAAC;AAajE,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAY,UAAU,EAAe,MAAM,SAAS,CAAC;AAajE,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;AAYD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,UAAU,CAAC,CAqCrB;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAErB;AAID,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAgBD,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,UAAU,CAAC,CA2BrB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAErB;AAID,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAUD,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,UAAU,CAAC,CA2BrB;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAMrB"}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"ci",
|
|
14
14
|
"automation"
|
|
15
15
|
],
|
|
16
|
-
"version": "0.2.
|
|
16
|
+
"version": "0.2.2",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/extensiondev/deploy.git"
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
+
"pintor": "0.3.0",
|
|
63
64
|
"zod": "^3.25.76"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|