@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.
- package/package.json +1 -1
- package/templates.ts +1 -1
- 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.
|
|
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
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 (
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
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
|
-
|
|
134
|
-
|
|
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")) {
|