@yarn-tool/publish-retry 1.0.0 → 1.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## 1.0.1 (2022-09-27)
7
+
8
+
9
+
10
+ ### 🔖 Miscellaneous
11
+
12
+ * . ([80e33d3](https://github.com/bluelovers/ws-yarn-workspaces/commit/80e33d35844792c279dd0a3a164207a9abafddaa))
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare function publishRetry(cwd?: string): Promise<void[]>;
2
- export {};
2
+ export default publishRetry;
package/index.js CHANGED
@@ -11,15 +11,14 @@ async function publishRetry(cwd) {
11
11
  return bluebird_1.default.resolve((0, ws_pkg_list_1.wsPkgListable)(cwd))
12
12
  .mapSeries(async (row) => {
13
13
  const { location: cwd } = row;
14
- logger_1.consoleLogger.dir(row);
15
14
  let bool = await (0, is_published_1.isPublishedByPackageJSON)(row);
16
15
  if (!bool) {
17
- logger_1.consoleLogger.info(`try to publish ${row.name}
18
- @${row.version}`);
16
+ logger_1.consoleLogger.bgYellow.red.info(`try to publish ${row.name}@${row.version}`);
19
17
  const cp = await (0, cross_spawn_extra_1.async)('npm', [
20
18
  'publish',
21
19
  ], {
22
20
  cwd,
21
+ stdio: 'inherit',
23
22
  });
24
23
  logger_1.consoleLogger.log(cp.status, cp.error);
25
24
  await bluebird_1.default.delay(1000);
@@ -27,5 +26,5 @@ async function publishRetry(cwd) {
27
26
  });
28
27
  }
29
28
  exports.publishRetry = publishRetry;
30
- publishRetry();
29
+ exports.default = publishRetry;
31
30
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAC5C,gEAAgC;AAChC,0DAAmE;AACnE,yDAAwD;AACxD,gDAA+D;AAExD,KAAK,UAAU,YAAY,CAAC,GAAY;IAE9C,OAAO,kBAAQ,CAAC,OAAO,CAAC,IAAA,2BAAa,EAAC,GAAG,CAAC,CAAC;SACzC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;QAE9B,sBAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjB,IAAI,IAAI,GAAG,MAAM,IAAA,uCAAwB,EAAC,GAAG,CAAC,CAAC;QAE/C,IAAI,CAAC,IAAI,EACT;YACC,sBAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI;MACrC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YAEjB,MAAM,EAAE,GAAG,MAAM,IAAA,yBAAU,EAAC,KAAK,EAAE;gBAClC,SAAS;aACT,EAAE;gBACF,GAAG;aACH,CAAC,CAAC;YAEH,sBAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;YAEjC,MAAM,kBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;IAEF,CAAC,CAAC,CACF;AACF,CAAC;AA5BD,oCA4BC;AAED,YAAY,EAAE,CAAC","sourcesContent":["import { wsPkgListable } from 'ws-pkg-list';\nimport Bluebird from 'bluebird';\nimport { isPublishedByPackageJSON } from '@yarn-tool/is-published';\nimport { async as crossSpawn } from 'cross-spawn-extra';\nimport { consoleLogger as console } from 'debug-color2/logger';\n\nexport async function publishRetry(cwd?: string)\n{\n\treturn Bluebird.resolve(wsPkgListable(cwd))\n\t\t.mapSeries(async (row) => {\n\t\t\tconst { location: cwd } = row;\n\n\t\t\tconsole.dir(row);\n\n\t\t\tlet bool = await isPublishedByPackageJSON(row);\n\n\t\t\tif (!bool)\n\t\t\t{\n\t\t\t\tconsole.info(`try to publish ${row.name}\n\t\t\t@${row.version}`);\n\n\t\t\t\tconst cp = await crossSpawn('npm', [\n\t\t\t\t\t'publish',\n\t\t\t\t], {\n\t\t\t\t\tcwd,\n\t\t\t\t});\n\n\t\t\t\tconsole.log(cp.status, cp.error);\n\n\t\t\t\tawait Bluebird.delay(1000);\n\t\t\t}\n\n\t\t})\n\t;\n}\n\npublishRetry();\n\nexport {}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAC5C,gEAAgC;AAChC,0DAAmE;AACnE,yDAAwD;AACxD,gDAA+D;AAExD,KAAK,UAAU,YAAY,CAAC,GAAY;IAE9C,OAAO,kBAAQ,CAAC,OAAO,CAAC,IAAA,2BAAa,EAAC,GAAG,CAAC,CAAC;SACzC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;QAE9B,IAAI,IAAI,GAAG,MAAM,IAAA,uCAAwB,EAAC,GAAG,CAAC,CAAC;QAE/C,IAAI,CAAC,IAAI,EACT;YACC,sBAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YAEvE,MAAM,EAAE,GAAG,MAAM,IAAA,yBAAU,EAAC,KAAK,EAAE;gBAClC,SAAS;aACT,EAAE;gBACF,GAAG;gBACH,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YAEH,sBAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;YAEjC,MAAM,kBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;IAEF,CAAC,CAAC,CACF;AACF,CAAC;AA1BD,oCA0BC;AAED,kBAAe,YAAY,CAAA","sourcesContent":["import { wsPkgListable } from 'ws-pkg-list';\nimport Bluebird from 'bluebird';\nimport { isPublishedByPackageJSON } from '@yarn-tool/is-published';\nimport { async as crossSpawn } from 'cross-spawn-extra';\nimport { consoleLogger as console } from 'debug-color2/logger';\n\nexport async function publishRetry(cwd?: string)\n{\n\treturn Bluebird.resolve(wsPkgListable(cwd))\n\t\t.mapSeries(async (row) => {\n\t\t\tconst { location: cwd } = row;\n\n\t\t\tlet bool = await isPublishedByPackageJSON(row);\n\n\t\t\tif (!bool)\n\t\t\t{\n\t\t\t\tconsole.bgYellow.red.info(`try to publish ${row.name}@${row.version}`);\n\n\t\t\t\tconst cp = await crossSpawn('npm', [\n\t\t\t\t\t'publish',\n\t\t\t\t], {\n\t\t\t\t\tcwd,\n\t\t\t\t\tstdio: 'inherit',\n\t\t\t\t});\n\n\t\t\t\tconsole.log(cp.status, cp.error);\n\n\t\t\t\tawait Bluebird.delay(1000);\n\t\t\t}\n\n\t\t})\n\t;\n}\n\nexport default publishRetry\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/publish-retry",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "yarn",
@@ -70,13 +70,15 @@
70
70
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
71
71
  },
72
72
  "dependencies": {
73
- "@yarn-tool/is-published": "^1.0.2",
74
- "tslib": ">=2"
73
+ "@yarn-tool/is-published": "^1.0.3",
74
+ "cross-spawn-extra": "^2.1.0",
75
+ "debug-color2": "^1.3.2",
76
+ "tslib": ">=2",
77
+ "ws-pkg-list": "^2.0.8"
75
78
  },
76
- "devDependencies": {},
77
- "peerDependencies": {},
78
79
  "packageManager": "yarn@1.22.19",
79
80
  "publishConfig": {
80
81
  "access": "public"
81
- }
82
+ },
83
+ "gitHead": "863a1f489a32c38c98313e4edd11f59d0c035d96"
82
84
  }