@open-workspace/create 0.6.1 → 0.6.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/templates.ts +1 -1
  3. package/update.ts +15 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-workspace/create",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Create an OpenWorkspace deployment (`bun create @open-workspace`), and import people, teams, SSO apps and mail.",
5
5
  "homepage": "https://openworkspace.dev",
6
6
  "license": "Apache-2.0",
package/templates.ts CHANGED
@@ -14,7 +14,7 @@ export type ProjectAnswers = {
14
14
  };
15
15
 
16
16
  export const versions = {
17
- openWorkspace: "0.6.1",
17
+ openWorkspace: "0.6.2",
18
18
  alchemy: "2.0.0-beta.87",
19
19
  effect: "4.1.7",
20
20
  typescript: "7.0.2",
package/update.ts CHANGED
@@ -84,7 +84,8 @@ export type UpdateDeps = {
84
84
  const usage = `Usage: bunx @open-workspace/create update [--no-deploy] (or bun run update), in your workspace's project
85
85
 
86
86
  Moves @open-workspace/core and email to the latest release, with the Alchemy
87
- and Effect versions it needs, installs them and deploys.`;
87
+ and Effect versions it needs, installs them and deploys. Run again after a
88
+ failed install or deploy, it installs and deploys the same versions again.`;
88
89
 
89
90
  /**
90
91
  * `bunx @open-workspace/create update`, run in a deployment project. Returns
@@ -123,22 +124,24 @@ export async function main(
123
124
  const latest = await deps.latest();
124
125
  const updated = updatedManifest(text, latest);
125
126
 
126
- if (!updated.changes.length) {
127
- if (updated.addsScript) writeFileSync(path, updated.text);
128
- deps.log(`Already on OpenWorkspace ${latest.version}.`);
127
+ if (updated.changes.length) {
128
+ for (const change of updated.changes) {
129
+ deps.log(`${change.name} ${change.from} → ${change.to}`);
130
+ }
129
131
 
130
- return 0;
132
+ deps.log(
133
+ `What changed: https://github.com/iivankin/openworkspace/releases/tag/v${latest.version}`
134
+ );
135
+ } else {
136
+ // Installed and deployed again all the same: an earlier run may have
137
+ // moved package.json and then failed to install or deploy.
138
+ deps.log(`Already on OpenWorkspace ${latest.version}.`);
131
139
  }
132
140
 
133
- for (const change of updated.changes) {
134
- deps.log(`${change.name} ${change.from} → ${change.to}`);
141
+ if (updated.changes.length || updated.addsScript) {
142
+ writeFileSync(path, updated.text);
135
143
  }
136
144
 
137
- deps.log(
138
- `What changed: https://github.com/iivankin/openworkspace/releases/tag/v${latest.version}`
139
- );
140
- writeFileSync(path, updated.text);
141
-
142
145
  if (!(await deps.run([process.execPath, "install"]))) return 1;
143
146
 
144
147
  if (args.includes("--no-deploy")) {